Hi
I don't know what exactly you want to do. But if you want enter mark for 10 students, I would write as follow (take into account that I have write it in a noteped, no compiler):
Code:
#include <stdio.h>
#include <stdlib.h>
#define TOTAL_STUDENTS 10
int main(void)
{
int m = 0;
int marks[3] = {0,0,0};
for (int student = 0; student < TOTAL_STUDENTS; student++) {
printf ("\nType mark for student %d .... ",student);
scanf("%d",m);
if (m<59) {
marks[0] ++;
} else if (m<75) {
marks[1] ++;
} else {
marks[2] ++;
}
}
printf("There are %d with mark A.\n",mark[0]);
printf("There are %d with mark B.\n",mark[1]);
printf("There are %d with mark C.\n",mark[2]);
}