Second Programming Assignment
For your second programming project in lab, you are to write a program to
play the game of hi-lo.
Your program will choose a number between 1 and 100 using statements
listed below.
The user will guess at the number and your program will report on whether
the guess was too high to too low.
It will continue to solicit guesses until the user has gotten it correct.
Finally, your program will report on how many guesses it took to
get to the right number and ask if the user wishes to play with another
number.
To choose the random number, include the following line at the
beginning of your program:
srandom(time(0));
and each time you wish to choose a secret number, include the
statement:
secret = (random() % 100) + 1;
You may move on to the
next part
or
return to the
index
.