Hello, I am a programming student and I'm glad I found this board. I have a problem I could use some help with.
The program should calculate an employees raise based on which department they work in. When I run the program, it calculates and displays two different raise amounts, one for department A and B(which have the same raise amount), and another for department C. I do not want both amounts to display.
Also, when the program executes, I need to have a data validation step. The program will display the message that states "Please enter A, B, or C" even if the user enters A, B or C. It also continues to execute if the input is not correct.
Why don't you convert the user input to all capital letter instead of having different conditions, e.g 'a', 'A', 'b''B'.
That way, there will be only one option which is capital letter and that will make the conditions look better.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* toupper example */
int main ()
char str="Test String.\n";