#include<stdio.h>
void main()
{
int eng, hin, maths, sci, comp, sum, total=500;
float per;
printf("Enter marks obtained in 5 subjects:");
scanf("%d%d%d%d%d", &eng, &hin, &maths, &sci, &comp);
sum= eng+hin+maths+sci+comp;
printf("Sum=%d",sum);
per=(sum*100)/total;
printf("Percentage= %f", per);
}
0 Comments