Ghislain_Mike

Grade according to marks

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