Question
Write a program that determines how many years 10 employees have to work before retiring. Here are the steps your program must accomplish. 1. Define
Write a program that determines how many years 10 employees have to work before retiring.
Here are the steps your program must accomplish.
1. Define a two-dimension array with 10 rows and 2 columns.
2. Prompt the user to enter the current age and desired retirement age for 10 employees . Current ages can be between 19 and 70. The valid retirement ages you can enter are 62, 66, and 70.
3. The program must store the current age and desired retirement age for each employee in a different row of the array.
4. The program must compute the number of years the employee has to work before they reach their desired retirement age, and display this output.
Below is an example of how the program should display the outputs for each employee. Note: your numbers will be different depending on the ages you enter.
The current age and desired retirement age for employee # 1 is: 21 62
Employee #1 has to work 41 years before they can retire
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started