All pastes #949617 Raw Edit

Something

public text v1 · immutable
·published 2008-03-19 22:22 UTC
rendered paste body
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);