SHARE
TWEET

Number and Grade

a guest Jun 19th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. main()
  3. {
  4.     int marks;
  5.     printf("Enter the marks:");
  6.     scanf("%d",&marks);
  7.     if((marks>=80)&&(marks<=100))
  8.         printf("A+",marks);
  9.  
  10.     else if((marks>=75)&&(marks<=79))
  11.  
  12.         printf("A",marks);
  13.  
  14.     else if((marks>=70)&&(marks<=74))
  15.  
  16.         printf("A-",marks);
  17.  
  18.     else if ((marks>=65)&&(marks<=69))
  19.  
  20.         printf("B+",marks);
  21.  
  22.     else if((marks>=60)&&(marks<=64))
  23.  
  24.         printf("B",marks);
  25.     else if((marks>=55)&&(marks<=59))
  26.         printf("C+",marks);
  27.     else if((marks>=50)&&(marks<=54))
  28.         printf("C",marks);
  29.     else if((marks>=45)&&(marks<=49))
  30.         printf("D+",marks);
  31.     else if((marks>=40)&&(marks<=44))
  32.         printf("D",marks);
  33.     else
  34.         printf(" F",marks);
  35.     return 0;
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top