int counter = 0, grade[10] = {0}; /* These variables will be reset on each reuse. grade is the array of grades to be input. counter keeps track of the elements that are entered*/ printf("\nYou may begin entering grades [Enter a 0 to end].\n"); do { printf("\nEnter grade\t"); scanf(" %d", &grade[counter]); if(grade[counter] != 0) counter++; } while(grade[counter] != 0 && counter < 10); != 0 && counter < 10);