HELP! New To C++ and stuck
Hello,
I am new to c++ this year, i know this looks like nothing hard to you but i am stuck. Should i use bool or if and else? I have been working on this for a while it has me baffled.
Thanks for your time,
John
[tag]
Write a 'C++' program to calculate an employee's net pay based on the information given below. Save your program with the name: BUDGET.CPP
INPUT
The following information will be entered from the keyboard for each employee:
Employee's name
Base Pay
Dollar amount of sales earned this month
PROCESSING
Calculations are to be done as follows:
Commission = Total Sales less $200 * 6.5% (if Total Sales are less than $1,200.00)
Commission = Total Sales less $150 * 7.25% (if Total Sales are $1,200.00 or more)
Gross Pay = Base Pay + Commission
Deductions:
Health Insurance = $58 (if Gross Pay is $600 or more)
Retirement Account = 9% of Base Pay and 17% of Commission
Taxes = 24.5% of Gross Pay
Net Pay = Gross Pay – Deductions
OUTPUT
Output will be to the screen. Print title and headings as indicated below. Print the base pay, amount of sales, amount of commission, gross pay, all deductions, and net pay. Where nnn appears, you calculated answers should be displayed. Wherever nnn.nn appears, your answer should display two digits to the right of the decimal point. Note that all the values must be aligned vertically. Remember your program should work for any employee.
Pseudocode for the assignment:
1 Input the Employee's name, Base Pay, and Dollar amount of sales earned this month.
2 Check the total sales for less than 1200
a. if yes compute commission = Total Sales less $200 * 6.5%
b. if no compute commission = Total Sales less $150 * 7.25%
3 Compute Gross Pay
4 Figure Deductions
a. check Gross Pay for under 600
1. if yes Health Insurance = 0
2. if no Health Insurance = 58
b. Figure Retirement Account = 9% of Base Pay and 17% of Commission
c. Figure Taxes = 24.5% of Gross Pay
5 Figure Net Pay = = Gross Pay – Deductions
6 Print Name of Employee Header to the screen
7 Print employee information to the screen.
Output Format:
BUDGET REPORT FOR name of employee
INCOME:
Base Pay: nnn.nn
Sales: nnnn.nn
Commission: nnn.nn
Gross: nnnn.nn
Deductions:
Insurance nnnn.nn
Retirement nnnn.nn
Taxes nnnn.nn
Net: nnnn.nn
[/tag]
:confused: :confused: