I've got a program I'm trying to write that generates a random number and then asks the user to try to guess that number. I've got it to run with if else code but I want to swap out the if else statements for a while loop and have it keep asking for user input until the user guesses right. I know this is quite a bit trivial as far as what this community may put out but I'm down to the wire on this project and I need it done asap. Thanks for any help you guys have for me.
void intro()
{
cout << "Welcome to the guessing game!" << endl;
cout << "I'll pick a number from 1 to 10. Try to guess it." << endl;
cout << "Okay, I've got my number." << endl << "What's your guess? ";