#include void main(void) { /* The simple program that finds the class average of 5 students who wrote a quiz using one dimensional array. Also, print the result with input data in a table */ int mark[5], sum, knt; float average; sum = 0; /* initialization, testing and updating of control variable */ /* done in one for instruction */ for (knt = 0; knt < 5; knt++) { printf("type the %d mark \t:", knt); scanf("%d", &mark[knt]); sum += mark[knt]; } average = (float) sum/knt; /* This now prints the input data and result */ printf("Mark \n"); for (knt = 0; knt < 5; knt++) { printf("%d \n", mark[knt]); } printf("average = %0.2f \n", average); }