#include <stdio.h>int main() {int n, i;printf("How Many Students? ");scanf("%d", &n);int a[1000], sum = 0, avg, aboveAvg = 0, belowAvg = 0;printf("Enter the Elements of the Array:\n");for (i = 0; i < n; i++) {scanf("%d", &a[i]);sum += a[i];}avg = sum / n;for (i = 0; i < n; i++) {if (a[i] > avg)aboveAvg++;else if (a[i] < avg)belowAvg++;}printf("\nAverage is %d.\n", avg);printf("%d students got above the average.\n", aboveAvg);printf("%d students got below the average.\n", belowAvg);return 0;}