Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool playAgain(void){
- char cRetry[2];
- cRetry[0] = '\0';
- while((cRetry[0] != 'y') && (cRetry[0] != 'n')){
- printf("Would you like to try again? [y/n]");
- fgets(cRetry, 2, stdin);
- if(cRetry[0])
- cRetry[0] = tolower(cRetry[0]);
- }
- return(cRetry[0] == 'y');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement