Quite_Angle
Beta member
- Messages
- 4
Hi member,
I want you guys help in this....I’m New to programming and i was trying to practice to programme small game..which is “ guessing the number” here is the code I wrote
ItÂ’s working but I want to know how can I control the user to choose only 3 time and telling them that the Game over.
This is the code I wrote:
Dim found as Boolean
Dim result as integer
Dim number as integer
Number=int((10*Rnd)+1)
Found= true
Do while found
Console print “ Guess the Number”
Result=Consoleread
If result= Number then
Consoleprint “you Got it”
Found=false
Elseif result>number then
Consolprint “it’s Less than this”
Else
Consoleprint “it’s greater than this”
End if
Loop
Help me please
Thanks
I want you guys help in this....I’m New to programming and i was trying to practice to programme small game..which is “ guessing the number” here is the code I wrote
ItÂ’s working but I want to know how can I control the user to choose only 3 time and telling them that the Game over.
This is the code I wrote:
Dim found as Boolean
Dim result as integer
Dim number as integer
Number=int((10*Rnd)+1)
Found= true
Do while found
Console print “ Guess the Number”
Result=Consoleread
If result= Number then
Consoleprint “you Got it”
Found=false
Elseif result>number then
Consolprint “it’s Less than this”
Else
Consoleprint “it’s greater than this”
End if
Loop
Help me please
Thanks