Hi all, below is a code I have written so far for my assignment.
What I am suppose to do:
The program uses a loop to prompt the user to enter the customer ID, sales amount and discount rate, computes and accumulates the net amount if the entered sales amount is more than $10000. The loop is control via the sentinel value, āEā. At the end of the loop, the program displays the total net amount with 2 decimal places. The net amount of each customer is computed using the following formula: Net amount = (1-Discount Rate/100) * Sales Amount
After running what I have written, I am only able to key in the custID, thereafter I am not able to key in anything.
If you move what I said outside the loop, the program should work as intended as long as you input the correct things, meaning, if you input numbers for ID, Sales & discount, and if you input a character for "cont".
If you enter "e" or "E" the program quit, if you enter any other letter it will run again. However if you enter 2 letters or more like "ab" or "mama", the program will run infinitly because of bad input, read here -