Ok......it still may have something to do with trailing newline characters. Try placing another getchar() at the end of your if-else chain.
Code:else{ printf("not a valid input.\n\n"); } getchar(); printf("-----------------------------");
Ok......it still may have something to do with trailing newline characters. Try placing another getchar() at the end of your if-else chain.
Code:else{ printf("not a valid input.\n\n"); } getchar(); printf("-----------------------------");
AndrewHunter, it worked, thank you for your help.
quzah, I will keep in mind about all the advice that have been given and will start cleaning up my code. I understand the reasoning and all.