Implement a program that takes the grade of a student ranging
from 0 to 100; and prints the grade as
Excellent, Very Good,
Good, Pass, Fail
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #include <stdio.h> int main() { int grade ; printf("plz enter your grade"); scanf("%d",&grade); if (100 >= grade && grade >= 90) printf("your grade is excellant"); else if (89 >= grade && grade >= 80) printf("your grade is very good"); else if (79>= grade && grade >= 70) printf("your grade is good"); else if (69>= grade && grade >= 60) printf("your grade is pass"); else if (grade <=50 ) printf("Sorry you are failed !!!"); else printf("undefined grade"); return 0 ; } |
0 Comment to "Grade from 0 to 100 system ( If Statement )"
Post a Comment