//WAP TO CALCULATE THE DIVISION OBTAINED BY THE STUDENT
#include
#include
void main()
{
float m1,m2,m3,m4,m5,total,perc,dvsn;
clrscr();
printf("ENTER THE MARKS OF Ist SUBJECT=");
scanf("%f",&m1);
printf("\n\nENTER THE MARKS OF 2nd SUBJECT=");
scanf("%f",&m2);
printf("\n\nENTER THE MARKS OF 3rd SUBJECT=");
scanf("%f",&m3);
printf("\n\nENTER THE MARKS OF 4th SUBJECT=");
scanf("%f",&m4);
printf("\n\nENTER THE MARKS OF 5th SUBJECT=");
scanf("%f",&m5);
total=m1+m2+m3+m4+m5;
perc=total/5;
if(perc>=60)
printf("\n\nCONGRATS!!!YOU GOT Ist DIVISION");
if(perc>=50&&perc<=59)
printf("\n\nNOT THAT MUCH BAD-YOU GOT 2nd DIVISION");
if(perc>=40&&perc<=49)
printf("\n\nJUST MANAGE TO PASS-YOU GOT 3rd DIVISION");
if(perc<40)
printf("\n\nWORK HARD NEXT TIME-YOU ARE FAILED");
getch();
}
/******OUTPUT******
ENTER THE MARKS OF Ist SUBJECT=98
ENTER THE MARKS OF 2nd SUBJECT=91
ENTER THE MARKS OF 3rd SUBJECT=54
ENTER THE MARKS OF 4th SUBJECT=80
ENTER THE MARKS OF 5th SUBJECT=70
CONGRATS!!!YOU GOT Ist DIVISION
*/
No comments:
Post a Comment