Code
#include<stdio.h>int main ()
{
float a,b,c,d,e,f;
float g;
printf ("Enter marks of 1st subject: ");
scanf ("%f",&a);
printf ("Enter marks of 2nd subject: ");
scanf ("%f",&b);
printf ("Enter marks of 3rd subject: ");
scanf ("%f",&c);
printf ("Enter marks of 4th subject: ");
scanf ("%f",&d);
printf ("Enter marks of 5th subject: ");
scanf ("%f",&e);
f = ((a+b+c+d+e)/5);
g = ((a+b+c+d+e)/500)*100;
printf ("\nAggregate marks= %f",f);
printf ("\nPercentage= %f \%",g);
printf ("press any key to close.");
getch ();
return 0;
}
Sorry to say but you should have given the answer for every age group.
ReplyDelete