#include #include #include #include "course.h" int Quit(void) { char quitchoice; printf("Are you sure? y/n"); scanf("%c",&quitchoice); switch(quitchoice) { case 'y': return(0); break; case 'n': return(1); break; } } int main(void) { int i = 1; while(i == 1) { char choice; printf("[L]oad Database \n[S]ave Database \n[P]rint Info \n[H]istogram \n[A]dd Student \n[R]emove Student \n[Q]uit \n\nMake your choice >>"); scanf("%c",&choice); switch(choice) { case 'q': Quit(); break; default: printf("There is no such command, please retry!\nTry again >>\n"); break; } i = Quit(); } return 0; }