My assignment code asks a user to enter grades for 5 different courses, however, the code can't use more than 1 scanf statement to store the variables.
How can I use a loop to do the same thing this code does?
int courseOne;
int courseTwo;
int courseThree;
int courseFour;
int courseFive;
scanf ("%d", &courseOne);
scanf ("%d", &courseTwo);
scanf ("%d", &courseThree);
scanf ("%d", &courseFour);
scanf ("%d", &courseFive);
Thanks!
Edit: Arrays are not allowed to be used. It is explicitly stated in the grade rubrics that a loop must be written for this question.