1. ## loops

some help with this one would be good.

Write a program that asks the user to think of a number between 1 and 100, then attempts to guess the number. The program should make an initial guess of 50. The program should then ask the user if 50 is the number the user has in mind, or if 50 is too high or too low. Based on the response given by the user, the program should make another guess. Your program must continue to guess until the correct number is reached.

2. Your best bet it to write a recursive function to do this. Make sure you have a base case where the function does not call itself.

function(int UserGuess, int CompGuess)
{
if( /*when they are the same*/)
{
/*they are the same*/
}
else
{
/*they are't the same so guess again*/
function(/*new guesses*/);
}
}

Make sure you write the function prototype before you write the function. Have fun

3. Why recursive? Do this inside of a do {} while loop, not recursively.

Use recursive functions for things like fractals, terrain generation, subdivisions, trees, etc.