Revise your input function as follows
Code:
unsigned long getNum(char prompt[80])
{
unsigned long darts;
printf("%s", prompt);
while((scanf("%lu", &darts)) != 1)
{
printf("\n\nThis is not an acceptable entry. please try again.\n");
printf("%s", prompt);
int c;
while ((c = getchar()) != '\n' && c != EOF)
;
}
return darts;
}
What's happening is this. There is a newline at the end of your buffer which scanf never consumes. So the part after you give the error message should throw away all characters up to and including the newline.