//WAP TO TAKE THE MARKS OF 5 SUBJECTS AND DISPLAY AGGT. AND %AGE
#include
#include
void main()
{
float m1,m2,m3,m4,m5,ag,prcntg;
clrscr();
printf("*********************HEllO**********************");
printf("\n\n\nENTER THE MARKS OF 1st SUBJECT=");
scanf("%f",&m1);
printf("\nENTER THE MARKS OF 2nd SUBJECT=");
scanf("%f",&m2);
printf("\nENTER THE MARKS OF 3rd SUBJECT=");
scanf("%f",&m3);
printf("\nENTER THE MARKS OF 4th SUBJECT=");
scanf("%f",&m4);
printf("\nENTER THE MARKS OF 5th SUBJECT=");
scanf("%f",&m5);
ag=m1+m2+m3+m4+m5;
printf("\n\n\n\nTotal Marks Obtained=%f",ag);
prcntg=ag/5;
printf("\n\nTOTAL PERCENTAGE=%f",prcntg);
printf("\n\n\n\nThank you for using the Program");
printf("\n\n\n\n\n\n\nProgrammer:Mr Abhishek Wadhwa");
getch();
}
/******OUTPUT******
*********************HEllO**********************
ENTER THE MARKS OF 1st SUBJECT=49
ENTER THE MARKS OF 2nd SUBJECT=71
ENTER THE MARKS OF 3rd SUBJECT=72
ENTER THE MARKS OF 4th SUBJECT=73
ENTER THE MARKS OF 5th SUBJECT=64
Total Marks Obtained=329.000000
TOTAL PERCENTAGE=65.800003
Thank you for using the Program
Programmer:Mr Abhishek Wadhwa
*/
No comments:
Post a Comment