RosettaCodeData/Task/Guess-the-number/PureBasic/guess-the-number.purebasic

14 lines
286 B
Text
Raw Permalink Normal View History

2015-11-18 06:14:39 +00:00
If OpenConsole()
Define TheNumber=Random(9)+1
2013-04-10 22:43:41 -07:00
2015-11-18 06:14:39 +00:00
PrintN("I've picked a number from 1 to 10." + #CRLF$)
Repeat
Print("Guess the number: ")
Until TheNumber=Val(Input())
2013-04-10 22:43:41 -07:00
2015-11-18 06:14:39 +00:00
PrintN("Well guessed!")
Print(#CRLF$ + #CRLF$ + "Press ENTER to exit"): Input()
CloseConsole()
EndIf