This simple issue is causing my entire program to crash during the first input. If I remove the input, the program works fine but once I add scanf into the code and enter th
Use "&answer". And get rid of the extraneous "fflush()" commands...
Better, substitute "answer = getchar ()".