Advertisement
samrina_sarkar_7

Find Grade

Jun 20th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     float m;
  5.     printf("enter the marks");
  6.     scanf("%f",&m);
  7.     if(m>=80&&m<=100)
  8.     {
  9.         printf("the grade is A+");
  10.     }
  11.     else if(m>=70&&m<=79)
  12.     {
  13.         printf("the grade is A");
  14.     }
  15.     else if(m>=60&&m>=69)
  16.     {
  17.         printf("the grade is A-");
  18.     }
  19.     else if(m>=50&&m<=59)
  20.     {
  21.         printf("the grade is B");
  22.     }
  23.     else if(m>=40&&m<=49)
  24.     {
  25.         printf("the grade is C");
  26.     }
  27.     else
  28.     {
  29.         printf("the grade is fail");
  30.     }
  31.     //main();
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement