You can't use a switch to test for a range (unless you list all the values in the range, which doesn't make much sense here).
--
Mats
Printable View
Okay I got the program to loop but now my last function doesn't keep track of the values entered so that they can be added.
how do i keep track of the total entered so far so that i can get the average?Code:void displayGrade (int value, char letter)
{
static int nscore = 0;
int tscore;
printf("The score of %d earned a grade of %c\n", value, letter);
printf("%d score were entered so far.\n", ++nscore );
printf("All scores entered so far total %d\n", tscore);
printf("The average score is %d\n", tscore/nscore);
}