ProAnswers.org

Answer please

using array write a program in C to display the number of 10 students and the sum of the number’s where user input the marks of the student .

Home work question? :slight_smile:
have you tried it?

//WAP to add the 10 student no by aaray

#include
#include
void main()
{
int student[10];
int a,sum=0;
float perc;
clrscr();
printf(“enter the marks of students
“);
for(a=0;a<10;a++)
{
scanf(”%d”,&student[a]);
sum=sum+student[a];

}
perc = sum/10;
printf(“and having percentage=%f”,perc);
getch();
}