C program for Grading System
Write a C program for Grading System to Calculate the Grade of a Student:
Required Knowledge:
C Basics, If-else
1 #include<stdio.h>
2 void main()
3 {
4 int marks;
5
6 printf("Enter student marks:");
7
8 scanf("%d",&marks);
9
10 if(marks>=80)
11
12 printf("Grade of student is A");
13
14 else if((marks<=79)&&(marks>=70))
15
16 printf("Grade of student is B");
17
18 else if((marks<=69)&&(marks>=60))
19
20 printf("Grade of student is C");
21
22 else if((marks<=59)&&(marks>=50))
23
24 printf("Grade of student is D");
25
26 else
27
28 printf("Grade of student is F");
29 }
Output:
Enjoy It......
Comments
Post a Comment
Dears! Yours Comment approved in 24 hours also your answer in 24 hours.......