作业(打折问题)
作业(打折问题)
Sub Main()
Dim a, b As Integer
b = 0
a = Console.ReadLine
If a < 1000 Then
Console.WriteLine(b)
Console.Read()
ElseIf a >= 1000 And a < 2000 Then
b = a * 0.95
Console.WriteLine(b)
Console.Read()
ElseIf a >= 2000 And a < 3000 Then
b = a * 0.9
Console.WriteLine(b)
Console.Read()
ElseIf a >= 3000 And a < 5000 Then
b = a * 0.8
Console.WriteLine(b)
Console.Read()
ElseIf a >= 5000 Then
b = a * 0.8
Console.WriteLine(b)
Console.Read()
End If
End Sub
End Module
Dim a, b As Integer
b = 0
a = Console.ReadLine
If a < 1000 Then
Console.WriteLine(b)
Console.Read()
ElseIf a >= 1000 And a < 2000 Then
b = a * 0.95
Console.WriteLine(b)
Console.Read()
ElseIf a >= 2000 And a < 3000 Then
b = a * 0.9
Console.WriteLine(b)
Console.Read()
ElseIf a >= 3000 And a < 5000 Then
b = a * 0.8
Console.WriteLine(b)
Console.Read()
ElseIf a >= 5000 Then
b = a * 0.8
Console.WriteLine(b)
Console.Read()
End If
End Sub
End Module
李晓光(网络一班)- 帖子数 : 2
注册日期 : 08-03-18
您在这个论坛的权限:
您不能在这个论坛回复主题