Question: c++ programming. if you would please write some comments to explain how it was solved. thank you! Write a program with at least FIVE (5)
c++ programming. if you would please write some comments to explain how it was solved. thank you!


Write a program with at least FIVE (5) functions inclusive of function main (using pass-by- value or pass-by-reference or combination of both) that produce output as shown below. Do you want to play this game? (Y/N): n Thank you for playing this game !!!!! Full mark for this question !!!!!!! First Screen for Question 2 First, the user is able to choose whether to continue or to end the program as shown above. If the user key-in n, the program will terminate and display the message as shown above. Do you want to play this game? (Y/N) : y Please key in the year when you start to work : 2000 Please key in the year when you stop to work : 1999 Please key in the year when you stop to work : 1980 Please key in the year when you stop to work : 2005 Please key in your salary : Second Screen for Question 2 When the user chose to play the game by key-in y as shown above, then the user need to key- in year of start work. Then, the user need to key-in the end of year. The program must be able to check until the stop year is more than the start year as shown above. When, the stop year is more than the start year, then the program needs another input, which is the salary. Do you want to play this game? (Y/N) : y Please key in the year when you start to work : 2000 Please key in the year when you stop to work : 2005 Please key in your salary : 1000 Leap year 2000 previous salary 1000 + increment 200 = new salary 1200 Not leap year 2001 previous salary 1200 + increment 120 = new salary 1320 Not leap year 2002 previous salary 1320 + increment 132 = new salary 1452 Not leap year 2003 previous salary 1452 + increment 145.2 = new salary 1597.2 Leap year 2004 previous salary 1597.2 + increment 319.44 = new salary 1916.64 Not leap year 2005 previous salary 1916.64 + increment 191.664 = new salary 2108.3 Do you want to play this game AGAIN ? (Y/N): Third Screen for Question 2 After the user key in a value for salary as shown above, the program will be able to determine whether it is a leap year or not. If it is a leap year, the increment given is twenty percent (20%). Otherwise, ten percent (10%) will be given for increment. Finally, the user is allowed to choose whether to continue or to end as shown above. Input Validation: Display an error message if the user enters invalid inputs and ask the user to key in the new inputs by using loop or iteration
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
