
-----------------------------------
MidnightDragon
Wed Nov 22, 2006 2:50 pm

Guessing game
-----------------------------------
I was wondering if some1 could help me fix up my code for this guessing game

%The Guessing Game
%Choose a number at random between 1 and 20
%And allows you to guess it.
var hidden, guess :int
var reply : string
var count : int :=0
var tries: int:=0
randint (hidden,1,20)
put "Do you want to play the game? y or n"
loop 
get reply
exit when reply = "n" 
if reply = "y" then
put "Enter Your Guess between 1, 10 "
get guess

tries:=tries+1
if tries > 5 then

put "Too many tries, You loose"
exit
end if

if guess=hidden then
put "You Won"
elsif guess>hidden then
put "Too High do you want to try again enter y or n"
elsif guess 5 then

put "Too many tries, You loose"
exit
end if

if guess=hidden then
put "You Won"
elsif guess>hidden then
put "Too High"
elsif guess