Q8. WAP to Input 5 subject marks of a student and find total marks and percentage obtained by the student. 1
#include<stdio.h>
int main()
{
int eng, hindi, maths, sci, computer, total;
float per;
printf("Enter English marks:");
scanf("%d",&eng);
printf("Enter Hindi marks:");
scanf("%d",&hindi);
printf("Enter Maths marks:");
scanf("%d",&maths);
printf("Enter Science marks:");
scanf("%d",&sci);
printf("Enter Computer marks:");
scanf("%d",&computer);
total = eng + hindi + maths + sci + computer;
per=total/5.0;
printf("Total = %d",total);
printf("\nPercentage = %f",per);
return 0;
}