ShriRam Changed status to publish July 15, 2022
Per >= 80 then A+ Grade Per < 80 and >= 70 then A Grade Per <70 and >= 60 then B Grade Per <60 and >= 50 then C Grade Else Fail #include<stdio.h> 1.Per >= 80 then A+ Grade 2.Per < 80 and >= 70 then A Grade 3.Per < 70 and >= 60 then B Grade 4.Per < 60 and >= 50 then C Grade 5.Else Fail */ void main() { int per,n1,n2,n3,n4,n5; printf("Enter marks of five subjects:"); scanf("%d%d%d%d%d",&n1,&n2,&n3,&n4,&n5); per=(n1+n2+n3+n4+n5)/5; printf("Result is :%d",per); if(per<=50) { printf(" Fail"); } else if(per>=50 && per<=60) { printf(" C Grade"); } else if(per>=60 && per<=70) { printf(" B Grade"); } else if(per>=70 && per<=80) { printf(" A Grade"); } else if(per>=80) { printf(" A+ Grade"); } getch(); }
ShriRam Changed status to publish July 15, 2022