Computer Programming teacher conducts test for 20 marks for 10 students. Teacher wants to know the average marks scored by the students.
#include <stdio.h>
int main() {
int marks[10];
printf("Enter students' marks");
for (int i=0; i<10; i++)
scanf("%d", &marks[i]);
int total = 0;
for (int i=0; i<10; i++)
total += marks[i];
printf("avarage mark: %f", 0.1 * total);
}
Comments
Leave a comment