Now the loop ends at 20. I made [Y/N] work. But I just need to let "Do you want to continue" reappear after the loop reaches 20.Code:#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int main()
{
clrscr();
int z[20],zenox;
char x;
printf("Do you want to continue? [Y/N]");
scanf("%c",&x);
for(zenox=0;zenox<20;zenox++)
if((x=='y')||(x=='Y'))
{
printf("Enter the grade for student %d:\n",zenox+1);
scanf("%d",&z[zenox]);
if((z[zenox]>100)||(z[zenox]<0))
{
printf("Invalid grade\n");
zenox--;
}
if(z[zenox]>=90)
printf("Excellent\n\n");
else if(z[zenox]>=80)
printf("Above Average\n\n");
else if(z[zenox]>=70)
printf("Average\n\n");
else if(z[zenox]>=60)
printf("Satisfactory\n\n");
else
printf("Failure\n\n");
}
else
exit (0);
getch ();
return 0;
}