i have to write a c++ program that will calculate the weekly pay for the employees of a company and the total amount of the payroll. input for the program will be the employee number number (int), status of the employee-exempt or non exempt (int).(Exempt employees receive pay for a maximum of forty hours even if the number of hours per week is over forty. so for an exempt worker the following would occur:
HOURLY RATE NUMBER OF HOURS TOTAL PAY
$10 30 hours $300
$10 40 hours $400
$10 50 hours $500

the last row is not a mistake there is no overtime pay for exempt workers. non exempt workers receive overtime pay at a rate of 1.5 times the hourly rate for any time over 40 hours. so for a non exempt worker that has a rate of 10$ with 50 hours, the pay would be $550 for the week.
the program should use a while loop that allows the user to calculate pay for many employees with the user inputing a new employee number to continue processing and a "-1" for the employee number when all employees have been processed.

the user should be asked for
1. employee number (int)
2.status (int)- 0(exempt) or 1 (non exempt)
3.hourly rate- double
4.number of hours worked-double

PLEASE HELP!!!!!
PLEASE HELP

i assume you didn't read the second post on the page where it says we only give help on homework to those who show effort. do you have any code and having a problem with it? do you have any idea what the logic should be? variables?

Create your variables and use cout statements to ask the user for the values of each variable. Then use cin>> to accept the user input for each variable.
Post the code you have written so far, so the community will be more willing to help you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.