某商场打折问题
某商场打折问题
Sub Main()
Dim x As Single = Console.ReadLine
Dim y As Single
If x <= 1000 Then
y = x
ElseIf x > 1000 And x <= 2000 Then
y = x * 0.95
ElseIf x > 2000 And x <= 3000 Then
y = x * 0.9
ElseIf x > 3000 And x <= 5000 Then
y = x * 0.8
End If
Console.WriteLine(y)
End Sub
End Module
Dim x As Single = Console.ReadLine
Dim y As Single
If x <= 1000 Then
y = x
ElseIf x > 1000 And x <= 2000 Then
y = x * 0.95
ElseIf x > 2000 And x <= 3000 Then
y = x * 0.9
ElseIf x > 3000 And x <= 5000 Then
y = x * 0.8
End If
Console.WriteLine(y)
End Sub
End Module
石会娟-网络三班- 帖子数 : 1
注册日期 : 08-03-18
您在这个论坛的权限:
您不能在这个论坛回复主题