C Program to calculate sum of 5 subjects and find percentage
C Program to calculate sum of 5 subjects and find percentage
Posted By Manisha Gupta
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b, c, d, e, total=500,sum=0;
float per;
printf("Manisha Enter the marks of all 5 subjects: ");
scanf("%d%d%d%d%d",&a, &b, &c, &d, &e);
sum =(a+b+c+d+e);
printf("Sum of 5 Subjects is: %d\n",sum);
per=(sum*100)/total;
printf("Percentage is: %f",per);
getch();
}