WAP to enter marks of 30 students, save it in an
array and find the average of the marks.
#include<stdio.h>
#include<conio.h>
void main()
{
int j,a[40];
int i,s=0;
float d;
clrscr();
printf("Enter the Numbers ");
for(i=0;i<30;i++)
scanf("%d",&a[i]);
for(i=0;i<30;i++)
{
s=s+a[i];
}
d=(s/30);
printf("The average of Student is = %f",d);
getch();
}
Read More »
