.NET自由天空
Would you like to react to this message? Create an account in a few clicks or log in to continue.

作业 陈庆岩(网2)

向下

作业  陈庆岩(网2) Empty 作业 陈庆岩(网2)

帖子  陈庆岩(网2) 周六 三月 22, 2008 9:25 am

商场折扣问题
Sub Main()
Dim a As Integer = Console.ReadLine
Dim b As Integer
If a < 1000 Then
b = a
ElseIf 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
Console.WriteLine(b)
End If
End Sub
数字游戏
Sub Main()
Dim a As Integer = Console.ReadLine
If a = 7 Then
Console.WriteLine("正确,继续猜!")
Else : End
End If
Dim b As Integer = Console.ReadLine
If b = 12 Then
Console.WriteLine("对了,再猜!")
Else : End
End If
Dim c As Integer = Console.ReadLine
If c = 13 Then
Console.WriteLine("正确!")
Else : End
End If
陈庆岩(网2)
陈庆岩(网2)

帖子数 : 2
注册日期 : 08-03-21

返回页首 向下

返回页首


 
您在这个论坛的权限:
不能在这个论坛回复主题