Advertisement
Hafizur

Grade

May 24th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {int marks;
  4. printf("Enter your marks:");
  5. scanf("%d",&marks);
  6. if(marks<50){
  7.     printf("Grade 'F'",marks);
  8. }
  9. else if (marks>=50&&marks<60){
  10. printf("Grade 'D'",marks);
  11. }
  12. else if (marks>=60&&marks<70){
  13.     printf("Grade C");
  14. }
  15. else if (marks>=70&&marks<80){
  16.     printf("Grade 'B'");
  17. }
  18. else if (marks>=80&&marks<90){
  19.     printf("Grade 'A'");
  20. }
  21. else
  22. printf("Grade A+");
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement