Question
Write, compile, and test a C++ program that uses a loop to calculate and display each employees weekly pay and the accumulated total pay for
Write, compile, and test a C++ program that uses a loop to calculate and display each employees weekly pay and the accumulated total pay for the company. The program will first ask the user for the number of employees. It will then ask for the number of hours and rate of pay for each employee and display the calculated pay for each employee.
EXAMPLE RUN (user input appears in blue and bold): Enter number of employees: 3 Hours: 5 Rate (in dollars): 4.00 Pay is $20.00 Hours: 6 Rate (in dollars): 5.00 Pay is $30.00 Hours: 1.5 Rate (in dollars): 10.00 Pay is $15.00 All employees processed. Total payroll is $65.00
Format Manipulators: setw ( ), setprecision ( ), setiosflags(ios::showpoint), setiosflags(ios::fixed), setiosflags(ios::scientific), setiosflags(ios::left), setiosflags(ios::right).
Escape Sequences: \b, \f, , , \\, \', \" Make sure: (i) Follow program template guidelines for all program documentation and output requirements. (ii) Declare all variables using the appropriate data types as indicated by the problem. (iii) All results should be displayed with two decimal place accuracy.
(iv) Include error correcting for inputs
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