Program to Print Grade (ALL SUBJECTS)

Share it Please
Description:
This program in used to print the grade according to the average obtained by marks of student.here there are only 5 subjects are included but you can add as many subjects as you want.it can be done by adding the marks of subjects and by dividing it by number of subjects.

Program:

#include<conio.h>
#include<stdio.h>
#define T 5
main()
{
       float TO,Percentage,M,P,C,E,Co;
       clrscr();
       printf("%%%To obtain percentage%%%");
       printf("\n\n\nMaths :");
       scanf("%f",&M);
       printf("\nChemistry :");
       scanf("%f",&C);
       printf("\nPhysics :");
       scanf("%f",&P);
       printf("\nEnglish :");
       scanf("%f",&E);
       printf("\nComputer :");
       scanf("%f",&Co);
       TO=M+C+P+E+Co;
       Percentage=TO/T;
       printf("\nPercentage: %f",Percentage);
       if(Percentage>85&&Percentage<100)
       {
              printf("\n\nGrade :A");
       }
       else if(Percentage>70&&Percentage<84.99)
       {
              printf("\n\nGrade :B");
       }
       else if(Percentage>55&&Percentage<69.99)
       {
              printf("\n\nGrade :C");
       }
       else if(Percentage>35&&Percentage<54.99)
       {
              printf("\n\nGrade :D");
       }
       else if(Percentage>20&&Percentage<34.99)
       {
              printf("\n\nGrade :E");
       }
       else if(Percentage>1&&Percentage<19.99)
       {
              printf("\n\nGrade :F");
       }
       getch();
}