我的打折优惠方法代码
我的打折优惠方法代码
Dim a As Integer = Console.ReadLine
Dim b As Integer
If a >= 1000 And a < 2000 Then
b = a * 0.95
ElseIf a >= 2000 And a < 3000 Then
b = a * 0.9
ElseIf a >= 3000 And a < 5000 Then
b = a * 0.85
ElseIf a >= 5000 Then
b = a * 0.8
ElseIf a < 1000 Then
b = a
End If
Console.WriteLine(b)
Dim b As Integer
If a >= 1000 And a < 2000 Then
b = a * 0.95
ElseIf a >= 2000 And a < 3000 Then
b = a * 0.9
ElseIf a >= 3000 And a < 5000 Then
b = a * 0.85
ElseIf a >= 5000 Then
b = a * 0.8
ElseIf a < 1000 Then
b = a
End If
Console.WriteLine(b)
张健波(网三)- 帖子数 : 1
注册日期 : 08-03-18
您在这个论坛的权限:
您不能在这个论坛回复主题