Hi everyone,
could someone please tell me WHY THE 'Are you sure you want to quit?' question gets asked twice, I've trid to put every possible condition on it but no matter what it is asked twice:
this is the third 'case' of a switch statement.Code:case 3: fflush(stdin); do { puts("Are you sure you want to quit ?"); ch = getc(stdin); if (ch == 'y') { printf("Thank you for using\n\n"); exit(0); } else if (ch == 'n') { puts("That's great!!!"); break; } }while(ch != 'n' || ch != 'y'); break; }
Any help would be appreciated.