- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
Dim num As Integer
Dim inp As Integer
Dim wrt As String
Dim liv As Integer
Sub Main()
liv = 3
Console.WriteLine("LIVES = " & liv)
pl:
If liv = 0 Then GoTo st
num = Fix(Rnd() * 5)
Console.WriteLine("ENTER NUMBER:")
inp = Console.ReadLine()
If inp < num Then
Console.WriteLine("GREATER")
liv = liv - 1
Console.WriteLine("LIVES = " & liv)
GoTo pl
End If
If inp > num Then
Console.WriteLine("LESS")
liv = liv - 1
Console.WriteLine("LIVES = " & liv)
GoTo pl
End If
If inp = num Then Console.WriteLine("YES!")
st:
Console.WriteLine("GAME OVER")
Console.WriteLine("ENTER ANY NUMBER TO EXIT")
inp = Console.ReadLine()
End Sub
Одна из моих первых "прог" на VB, написанная около 4х лет назад - "Угадай число".
Lure Of Chaos 21.03.2011 22:16 # +2
guest 01.04.2011 15:42 # +1
Lure Of Chaos 19.04.2011 19:42 # +1
Govnocoder#0xFF 19.04.2011 19:12 # 0
Lure Of Chaos 19.04.2011 19:42 # +1
Govnocoder#0xFF 19.04.2011 19:53 # 0
-666. Угадал?
Lure Of Chaos 19.04.2011 19:56 # +1
Govnocoder#0xFF 19.04.2011 20:01 # 0
while true do
str := str + 'а';