This is a random guessing game. The game Secret Numbers is from min to max that are input by the user. The guesser asks guess the secret number and at the end it is supposed to be asked if they would like to play again. There also has to be multiple options for print outs if the guesser is too high or low. I am new to programming and this has got me stumped. Any help would be appreciated.
Now i can't get the user to cin again after type alphabet in the do while loop. So, any advice on the best route to do that would be appreciated.
cout<<"\nEnter ur amount to play game: ";
cin>> amount;
do{
cout<<"\n\n"<< name<< ", What is ur betting amount? ";
cin>> bet_amount;
if(bet_amount > amount)
cout << "Your betting amount is more than your current balance!\n";
else if(!(cin>> bet_amount)){
cin.clear();
cin.ignore();
}
}while(bet_amount > amount || !(cin>> bet_amount));
while(1){
// Read in guess
cout<< "\n\nEnter a guess to bet: ";
cin >> guess;
...