123456789101112131415
#include <stdio.h> #include <string.h> #include <stdlib.h> int main(int argc, char** argv){ char check[2]; char no[] = "n"; printf("Type n to quit\n"); scanf("%s",check); if(!(strcmp(check,no))){ printf("Okay exiting\n"); exit(1); } //rest of program here return 0; }