When i enter the Total No of Student: 2
It will appear as 3 students on the for loop.
How to fix this?
thank you.
Code:
void main()
{
char code[15], name[15], grade;
int student, A=0, B=0, C=0, F=0, y=1, x, i=0;
float midterm, final, total, quizm, assignment;
printf("\nEnter Subject Code : ");
gets(code);
printf("Enter Subject Name : ");
gets(name);
printf("Enter Total No of Student : ");
scanf("%d",&student);
for(i=0; i<=student; i++);
{
printf("\n------------------------------------");
printf("\n STUDENT %d ", i);
printf("\n------------------------------------");
}
}