-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
45 lines (40 loc) · 965 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <stdio.h>
#include "header.h"
int main()
{
Student students[MAX_STUDENTS];
int num_students = 0;
load_student_data(students, &num_students);
int choice;
do
{
printf("\nMenu:\n");
printf("1. Update student details\n");
printf("2. Calculate SGPA\n");
printf("3. Display grade card\n");
printf("4. Quit\n");
printf("Enter your choice: ");
scanf("%d", &choice);
switch (choice)
{
case 1:
update_student_details(students, num_students);
break;
case 2:
calculate_sgpa(students, num_students);
printf("SGPA calculation completed successfully.\n");
break;
case 3:
display_grade_card(students, num_students);
break;
case 4:
save_student_data(students, num_students);
printf("Data saved successfully.\n");
break;
default:
printf("Invalid choice. Please try again.\n");
break;
}
} while (choice != 4);
return 0;
}