well, you can have a function that generates a rando number. If you want that number to be trully different seed srand to time...if you need more info about this, do a search on the board.
add the two rand numbers, get user input, and compare....based on the comparison result go further.
Code:
int get_rand()
{
//get random nuber here;
return randNum;
}
int main()
{
int number1 = get_rand();
int number2 = get_rand();
int sum = number1 + number2;
//main prog loop
while( guessing )
{
//get user input compare that to sum using if statement
//if TRUE display it and break out of the loop, if not continue
}
}
this should get you sarted.....another hint...when you are testing and debugging your program seed rand to a constant value.