//************************************************** //**********High Low Guessing Game****************** //**********by David Peng**with some minor additions //**********by the FreyDawg************************* //This program involves the use of random numbers*** #include//note the extra header files #include #include int main(void) { char y;//yes char n;//no char c;//short for continue int score=0; int total; int trys=0;//this is for the number of trys per game float numGuessTotal=0;//this is the total for all trys //THIS IS WHERE WE BEGIN THE LOOP while(c!='n') { int range=0, number=0, input=0, numGuess=0; srand((unsigned char)time(NULL));//this creates the random number cout<<"Hi-Low!\nEnter maximum number: "; cin>>range; trys++;//each time the user makes a try, the counter adds one number=rand() % range; do { cout<<"Guess the number: "; cin>>input; numGuess++;//each guess is counted numGuessTotal++;//the total number of guess is counted if(input>number) cout<<"Too high!\n"; if(input>c;//THE USER DECIDES TO CONTINUE OR NOT } return 0; }