parent
12bfd6668b
commit
8dd0239668
@ -0,0 +1,55 @@
|
|||||||
|
#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:
|
||||||
|
printf("You are trying to Input info\n");
|
||||||
|
inputStudentInfo(students, &count);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
printf("You are trying to Output info\n");
|
||||||
|
displayStudentInfo(students, count);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
printf("You are trying to Insert info\n");
|
||||||
|
insertStudentInfo(students, &count);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
printf("You are trying to Insert info\n");
|
||||||
|
deleteStudentInfo(students, &count);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
printf("You are trying to Modify info\n");
|
||||||
|
modifyStudentInfo(students, count);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
printf("You are trying to Query info\n");
|
||||||
|
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