Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  เทียน
Language: C/C++
Code:
#include <stdio.h>
main()
{     float a,b;
     printf("Enter your score : ");
     scanf("%f",&a);
     if(a>=80)
     {
          b=4,'A';
     }
     else if(a>=75)
     {
          b=3.5,'A-';
     }
          else if(a>=70)
          {
               b=3,'B';
          }
          else if(a>=65)
          {
               b=2.5,'B-';
          }
               else if(a>=60)
               {
                    b=2,'C';
               }
               else if(a>=55)
               {
                    b=1.5,'C-';
               }
                    else if(a>=50)
                    {
                         b=1,'D';
                    }
                    else
                    {
                         b=0,'F' '';
                    }

     printf("You get :%.2f",b);
     scanf("%f",&a);
}     
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
Comments: