Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NEED THIS ASAP!!! Write a C++ console application that uses functions to calculate an employees salary. PART 1 : Create a void function to print

NEED THIS ASAP!!!

Write a C++ console application that uses functions to calculate an employees salary.

PART 1: Create a void function to print a menu asking the user to choose from the following options:

1 - Annual salary

2 - Monthly salary

3 - Daily rate of pay

4 Exit

The void function only prints the menu. Format your cout statement to include the menu as displayed above.

If the chosen option is 1- Annual Salary, ask the user for the number of hours they work per week and their hourly wage:

Annual Salary = hourly wage x hours worked per week x 52

If the chosen option is 2- Monthly Salary, ask the user for the number of hours they work per week and their hourly wage:

Monthly Salary = Annual Salary / 12

If the chosen option is 3- Daily Rate of Pay, ask the user for the number of hours they work per day and their hourly wage:

Daily Rate of Pay = hours worked in a day x hourly wage

PART 2: Create different double functions to calculate each of these rates.

Continue to prompt the user for a value until an invalid option is entered. The sentinel value in this application is 4 (Exit). An invalid option would be anything other than 1,2,3, and 4. Output the information back to the user in columns with one column including labels and the other including a value. Be sure to include the units for the values printed to the screen. Format any real numbers to two decimal places.

[your program code here]*

If possible, format your code like this:

Font Courier New

Font size 9

Bold

[your program output here]**

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

Step: 3

blur-text-image

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

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions

Question

4. Are there any disadvantages?

Answered: 1 week ago

Question

3. What are the main benefits of using more information technology?

Answered: 1 week ago

Question

start to review and develop your employability skills

Answered: 1 week ago