Mark list c programme

#include int main() { float m1,m2,m3,m4,m5; printf("enter marks-"); scanf("%f%f%f%f%f",&m1,&m2,&m3,&m4,&m5); printf("__________________________\n"); float total=m1+m2+m3+m4+m5; float percentage=(total*100)/500; printf("total marks-%f\n",total); printf("total percentage-%f\n",percentage); if(percentage>75) printf("GRADE A \n"); else if(percentage>=50 && percentage<=75) printf("GRADE B\n"); else if(percentage>30 && percentage<50) printf("GRADE C\n"); else printf("FAIL"); return 0; }

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.