parent
9fa6182d34
commit
0db1fd92c9
@ -1,49 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include<time.h>
|
|
||||||
#include "menu.h"
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
Student students[MAX_STUDENTS];
|
|
||||||
int count = 0;
|
|
||||||
int option;
|
|
||||||
|
|
||||||
do {
|
|
||||||
displayMenu();
|
|
||||||
if (scanf_s("%d", &option) != 1) {
|
|
||||||
printf("Invalid input. Please enter a number.\n");
|
|
||||||
while (getchar() != '\n');
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (option) {
|
|
||||||
case 1:
|
|
||||||
inputStudentInfo(students, &count);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
displayStudentInfo(students, count);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
insertStudentInfo(students, &count);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
deleteStudentInfo(students, &count);
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
modifyStudentInfo(students, count);
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
queryStudentInfo(students, count);
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
printf("You are about to Quit\n");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
printf("Wrong input\n");
|
|
||||||
}
|
|
||||||
} while (option != 7);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
Loading…
Reference in new issue