Answer:
The program in C is as follows:
#include <stdio.h>
int main(){
int scores[10];
for(int i = 0; i<10;i++){
scanf("%d", &scores[i]); }
int max = scores[0];
for(int i = 0; i<10;i++){
if(max<scores[i]){
max = scores[i]; } }
for(int i = 0; i<10;i++){
if(max==scores[i]){
printf("%d ", scores[i]);
} }
return 0;
}
Explanation:
This declares the average scores as an integer array
int scores[10];
The following iteration gets the average score for each student
for(int i = 0; i<10;i++){
scanf("%d", &scores[i]); }
This initializes the maximum to the first index
int max = scores[0];
This iterates through the 10 elements of the array
for(int i = 0; i<10;i++){
This makes comparison to get the maximum
if(max<scores[i]){
max = scores[i]; } }
This iterates through the 10 elements of the array
for(int i = 0; i<10;i++){
This prints all maximum in the array
if(max==scores[i]){
printf("%d ", scores[i]);
} }
return 0;
}