How do you write a c program that computes the results of ten students for any given four subjects grading their results from a to you?

1 answer

Answer

1256395

2026-05-14 14:35

+ Follow

#include<stdio.h>

#include<conio.h>

void main()

{

int n, i,a[100],sum=0;

float avg;

printf("Enter number of students");

scanf("%d",&n);

printf("Enter the marks score by students one by one");

for(i=0;i<n;i++)

{

scanf("%d",&a[i]);

sum=sum+a[i];

}

avg=sum/n;

printf("The average is %f", avg);

getch();

}

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.