Advertisement
joyonto511

Problem -3

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