This is in main, and loops, of course, until the user presses 'e'. For some reason though, it gets printed twice after it determines what button was pressed and goes and does what it's suppose too. Any ideas?
Code:
while(input != 'e'){
printf("Please make a selection:\n");
printf("a <id number> to enter a customer into queue\n");
printf("r to remove a customer from queue\n");
printf("c to get a count of customers\n");
printf("e to exit program\n");
input = getchar();
printf("\n");
if(input == 'r'){
if(remCust() == 0)
printf("Error");
}
else if(input == 'c'){
printf("Count: %d\n",countCust());
}
else if(input == 'a'){
scanf("%d", &id);
printf("\n");
if(addCust(id) == 0)
printf("Not added\n");
}
}