#include<stdio.h>
void main()
{
int English,Hindi,Maths,Science,Sst ;//this goes in a single line.
float Percentg ,avg;
printf("\n English");
scanf("%d",&English);
printf("\n Hindi");
scanf("%d",&Hindi);
printf("\n Maths");
scanf("%d",&Maths);
printf("\n Science");
scanf("%d",&Science);
printf("\n Sst");
scanf("%d",&Sst);
avg=(English+Hindi+Maths+Science+Sst)/500.0;//this goes in a single line.
printf("%f \n",avg);
Percentg=avg*100; printf("%f",Percentg);
}
Tags:
Basic C program