If the marks obtained by a student in five different subjects are input through the keyboard, find out the aggregate marks and percentage marks obtained by the student. Assume that the maximum marks that can be obtained by a student in each subject is 100.

#include<stdio.h>
main()
{

int m1, m2, m3, m4, m5, total;
float percentage;

printf ("Enter the marks obtained by the student in all the five subjects: ");
scanf ("%d %d %d %d %d", &m1, &m2, &m3, &m4, &m5);

total= m1+m2+m3+m4+m5;
percentage = total/5;

printf ("\nThe aggregate marks obtained by the student are: %d", total);
printf ("\nThe percentage obtained by the student are %f", percentage);

}






The File can be found at:
Download File

No comments:

Post a Comment

kiss on google ads if you are anonymous because your ip is trackable.thank you.

......from.admin