Advertisement
taky2917

grade point generetor

Jan 25th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.02 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     float a;
  6.     printf("enter your marks:");
  7.     scanf("%f",&a);
  8.     if(a>=80&&a<=100)
  9.     {
  10.         printf("CONGRATULATIONS! you got A+\n");
  11.         printf("4.00\n");
  12.     }
  13.  
  14.     if (a>=75&&a<=79)
  15.     {
  16.         printf("A\n");
  17.         printf("3.75\n");
  18.     }
  19.  
  20.     if (a>=70&&a<=74)
  21.     {
  22.         printf("A-\n");
  23.         printf("3.50\n");
  24.     }
  25.  
  26.     if (a>=65&&a<=69)
  27.     {
  28.        printf("B+\n");
  29.         printf("3.25\n");
  30.     }
  31.  
  32.     if (a>=60&&a<=64)
  33.     {
  34.       printf("B\n");
  35.         printf("3.00\n");
  36.     }
  37.  
  38.     if (a>=55&&a<=59)
  39.     {
  40.        printf("B-\n");
  41.         printf("2.75\n");
  42.     }
  43.  
  44.     if (a>=50&&a<=54)
  45.     {
  46.        printf("C+\n");
  47.         printf("2.50\n");
  48.     }
  49.  
  50.     if (a>=45&&a<=49)
  51.     {
  52.         printf("C\n");
  53.         printf("2.25\n");
  54.     }
  55.  
  56.     if (a>=40&&a<=44)
  57.     {
  58.        printf("D\n");
  59.         printf("2.00\n");
  60.     }
  61.  
  62.     if (a>=00&&a<=39)
  63.     {
  64.       printf("F\n");
  65.         printf("0.00\n");
  66.     }
  67.  
  68.  
  69.  return 0;
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement