Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ 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

c++

image text in transcribed

image text in transcribed

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 2008 previous salary 1000 + increment 280 = new salary 1200 Not leap ear 2001 previous salary 1200 + increment 120 = new salary 1320 Not leap year 2002 previous salary 1328 + 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. Do you want to play this game? (Y/N) : y Please key in the year when you start to work : 2008 Please key in the year when you stop to work : 2005 Please key in your salary : 1000 Leap year 2008 previous salary 1800 + 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)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions

Question

6. Recognize the impact of pay for performance

Answered: 1 week ago

Question

Analyse the various techniques of training and learning.

Answered: 1 week ago