Example:
Input
Enter marks of five subjects: 95 76 85 90 89
Output
Total = 435
Average = 87
Percentage = 87.00
Solution:
#include<stdio.h>
int main ()
{
double a,b,c,d,e,total,avg,per;
printf("Enter marks of five subjects: ");
scanf("%lf %lf %lf %lf %lf",&a,&b,&c,&d,&e);
total = a+b+c+d+e;
avg = total/5;
per = (total * 100) / 500; // Full Marks = '500'
printf("Total = %.0lf\n",total);
printf("Average = %.0lf\n",avg);
printf("Percentage = %.2lf\n",per);
return 0;
}