作业-商场购物.猜字游戏.闰年..............
作业-商场购物.猜字游戏.闰年..............
Sub Main()
Dim a As Integer
a = Console.ReadLine()
If a Mod 4 = 0 And a Mod 100 <> 0 Then
Console.WriteLine("是闰年")
Else
Console.WriteLine("不是闰年")
End If
End Sub
End Module
Sub Main()
Dim a As Integer
a = Console.ReadLine
If a < 1000 Then
Console.WriteLine("不打折")
ElseIf a >= 1000 And a < 2000 Then
Console.WriteLine(a * 0.95)
ElseIf a >= 2000 And a < 3000 Then
Console.WriteLine(a * 0.9)
ElseIf a >= 3000 And a < 5000 Then
Console.WriteLine(a * 0.85)
ElseIf a >= 5000 Then
Console.WriteLine(a * 0.
End If
End Sub
Sub Main()
Const a = 2, b = 1, c = 4
Dim e, f, g As String
Console.WriteLine("猜第一位")
e = Console.ReadLine()
If e = a Then
Console.WriteLine("猜第二位")
f = Console.ReadLine()
End If
If f = b Then
Console.WriteLine("猜第三位")
g = Console.ReadLine
End If
If g = c Then
Console.WriteLine("恭喜!密码被你破译")
End If
Console.WriteLine("失败")
End Sub
End Module
Dim a As Integer
a = Console.ReadLine()
If a Mod 4 = 0 And a Mod 100 <> 0 Then
Console.WriteLine("是闰年")
Else
Console.WriteLine("不是闰年")
End If
End Sub
End Module
Sub Main()
Dim a As Integer
a = Console.ReadLine
If a < 1000 Then
Console.WriteLine("不打折")
ElseIf a >= 1000 And a < 2000 Then
Console.WriteLine(a * 0.95)
ElseIf a >= 2000 And a < 3000 Then
Console.WriteLine(a * 0.9)
ElseIf a >= 3000 And a < 5000 Then
Console.WriteLine(a * 0.85)
ElseIf a >= 5000 Then
Console.WriteLine(a * 0.
End If
End Sub
Sub Main()
Const a = 2, b = 1, c = 4
Dim e, f, g As String
Console.WriteLine("猜第一位")
e = Console.ReadLine()
If e = a Then
Console.WriteLine("猜第二位")
f = Console.ReadLine()
End If
If f = b Then
Console.WriteLine("猜第三位")
g = Console.ReadLine
End If
If g = c Then
Console.WriteLine("恭喜!密码被你破译")
End If
Console.WriteLine("失败")
End Sub
End Module
赵鹏健-07网4- 帖子数 : 1
注册日期 : 08-03-18
您在这个论坛的权限:
您不能在这个论坛回复主题