07网4王艳明
2 posters
07网4王艳明
Module Module1
Sub Main()
Dim x As Int16 = Console.ReadLine
If x < 1000 Then
Console.WriteLine(x * 1)
ElseIf x >= 1000 And x <= 2000 Then
Console.WriteLine(x * 0.95)
ElseIf x > 2000 And x <= 3000 Then
Console.WriteLine(x * 0.9)
ElseIf x > 3000 And x <= 5000 Then
Console.WriteLine(x * 0.85)
ElseIf x > 5000 Then
Console.WriteLine(x * 0.
End If
End Sub
End Module
Sub Main()
Dim x As Int16 = Console.ReadLine
If x < 1000 Then
Console.WriteLine(x * 1)
ElseIf x >= 1000 And x <= 2000 Then
Console.WriteLine(x * 0.95)
ElseIf x > 2000 And x <= 3000 Then
Console.WriteLine(x * 0.9)
ElseIf x > 3000 And x <= 5000 Then
Console.WriteLine(x * 0.85)
ElseIf x > 5000 Then
Console.WriteLine(x * 0.
End If
End Sub
End Module
王艳明-07网4- 帖子数 : 3
注册日期 : 08-03-18
打折 挑贵的买!!!
Module Module1
Sub Main()
Dim a As Integer = Console.ReadLine
Dim b As Integer
If a >= 1000 And a < 2000 Then
b = 0.95 * a
ElseIf a >= 2000 And a < 3000 Then
b = 0.9 * a
ElseIf a >= 3000 And a < 5000 Then
b = 0.85 * a
ElseIf a >= 5000 Then
b = 0.8 * a
ElseIf a < 1000 Then
b = a
End If
Console.WriteLine(b)
End Sub
End Module
Sub Main()
Dim a As Integer = Console.ReadLine
Dim b As Integer
If a >= 1000 And a < 2000 Then
b = 0.95 * a
ElseIf a >= 2000 And a < 3000 Then
b = 0.9 * a
ElseIf a >= 3000 And a < 5000 Then
b = 0.85 * a
ElseIf a >= 5000 Then
b = 0.8 * a
ElseIf a < 1000 Then
b = a
End If
Console.WriteLine(b)
End Sub
End Module
臧立杰- 帖子数 : 1
注册日期 : 08-03-18
您在这个论坛的权限:
您不能在这个论坛回复主题