-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path4.c
40 lines (36 loc) · 832 Bytes
/
4.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
#include <stdio.h>
int main()
{
int marks;
while (1)
{
printf("Enter Student Marks (Enter -1 to exit): ");
scanf("%d", &marks);
if (marks == -1)
{
printf("Exiting the program...\n");
break;
}
else if (marks > 80 && marks <= 100)
{
printf("The Student Got A+\n");
}
else if (marks > 60 && marks <= 80)
{
printf("The Student Got A\n");
}
else if (marks > 40 && marks <= 60)
{
printf("The Student Got B\n");
}
else if (marks <= 40)
{
printf("The Student Failed\n");
}
else
{
printf("Marks are Unrecognized\n");
}
}
return 0;
}