When you enter "stop" the program will still prompt you for hourly rate and number of hours worked because it hasn't yet reached the test at the bottom of the do-while loop. Do the test immediately after the employee name and if the user entered "stop" execute a break statement. The condition for the loop is simply do / while (true).
No comments:
Post a Comment