-
Language
C
-
Description
The grade and remarks should be displayed when marks have been entered.
Marks | Grade | Remarks
90 -100 | A | Excellent
70 - 89 | B | Good
50 - 69 | C | Average
40 - 49 | D | Satisfactory
00 - 39 | F | Poor
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
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
#include <stdio.h>
#include <stdlib.h>
int main (void)
{
int marks;
printf ("Enter the value of marks: ");
scanf ("%d", &marks);
(void) getchar ();
if(marks>=90&&marks<=100)
{
printf ("Grade: A\n");
printf ("Remarks: Excellent\n");
}
if(marks>=70&&marks<=89)
{
printf ("Grade: B\n");
printf ("Remarks: Good\n");
}
if(marks>=50&&marks<=69)
{
printf ("Grade: C\n");
printf ("Remarks: Average\n");
}
if(marks>=40&&marks<=49)
{
printf ("Grade: D\n");
printf ("Remarks: Satisfactory\n");
}
if(marks<=39)
{
printf ("Grade: F\n");
printf ("Remarks: Poor\n");
}
putchar ('\n');
system ("pause");
return EXIT_SUCCESS;
}
#include <stdlib.h>
int main (void)
{
int marks;
printf ("Enter the value of marks: ");
scanf ("%d", &marks);
(void) getchar ();
if(marks>=90&&marks<=100)
{
printf ("Grade: A\n");
printf ("Remarks: Excellent\n");
}
if(marks>=70&&marks<=89)
{
printf ("Grade: B\n");
printf ("Remarks: Good\n");
}
if(marks>=50&&marks<=69)
{
printf ("Grade: C\n");
printf ("Remarks: Average\n");
}
if(marks>=40&&marks<=49)
{
printf ("Grade: D\n");
printf ("Remarks: Satisfactory\n");
}
if(marks<=39)
{
printf ("Grade: F\n");
printf ("Remarks: Poor\n");
}
putchar ('\n');
system ("pause");
return EXIT_SUCCESS;
}