A company pays its employees a weekly salary based on the number of working hours per...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A company pays its employees a weekly salary based on the number of working hours per week as it follows: fixed hourly wage for up to the first 40 hours they work and "time-and-a-half"-1.5 times their hourly wage-for overtime hours worked. Write a C++ program to compute the weekly pay for each employee. You do not know the number of employees in advance. The program asks the user to input the number of employees, then for each employee the user should input the number of hours worked for that week. Display the weekly pay as a fixed decimal with three digits of precision. In addition, the program should print the maximum salary paid for an employee for that week. Sample Input/Output Enter the number of employees: 3 Enter number of hours worked by employee 1: 38 Enter hourly rate of the employee number 1: 100 weekly salary of employee number 1 is Dirhams 3800.000 Enter number of hours worked by employee 2: 42 Enter hourly rate of the employee number 2: 50 weekly salary of employee number 2 is Dirhams 2150.000 Enter number of hours worked by employee 3: 46 Enter hourly rate of the employee number 3: 100 weekly salary of employee number 3 is Dirhams 4900.000 the maximum salary that has been paid this week is 4900.000 to employee number 3 Enter the number of employees: 2 Enter number of hours worked by employee 1: 5 Enter hourly rate of the employee number 1: 220 weekly salary of employee number 1 is Dirhams 1100.000 Enter number of hours worked by employee 2: 50 Enter hourly rate of the employee number 2: 18 weekly salary of employee number 2 is Dirhams 990.000 the maximum salary that has been paid this week is 1100.000 to employee number 1 A company pays its employees a weekly salary based on the number of working hours per week as it follows: fixed hourly wage for up to the first 40 hours they work and "time-and-a-half"-1.5 times their hourly wage-for overtime hours worked. Write a C++ program to compute the weekly pay for each employee. You do not know the number of employees in advance. The program asks the user to input the number of employees, then for each employee the user should input the number of hours worked for that week. Display the weekly pay as a fixed decimal with three digits of precision. In addition, the program should print the maximum salary paid for an employee for that week. Sample Input/Output Enter the number of employees: 3 Enter number of hours worked by employee 1: 38 Enter hourly rate of the employee number 1: 100 weekly salary of employee number 1 is Dirhams 3800.000 Enter number of hours worked by employee 2: 42 Enter hourly rate of the employee number 2: 50 weekly salary of employee number 2 is Dirhams 2150.000 Enter number of hours worked by employee 3: 46 Enter hourly rate of the employee number 3: 100 weekly salary of employee number 3 is Dirhams 4900.000 the maximum salary that has been paid this week is 4900.000 to employee number 3 Enter the number of employees: 2 Enter number of hours worked by employee 1: 5 Enter hourly rate of the employee number 1: 220 weekly salary of employee number 1 is Dirhams 1100.000 Enter number of hours worked by employee 2: 50 Enter hourly rate of the employee number 2: 18 weekly salary of employee number 2 is Dirhams 990.000 the maximum salary that has been paid this week is 1100.000 to employee number 1
Expert Answer:
Related Book For
Quantitative Methods for Business
ISBN: 978-0324651751
11th Edition
Authors: David Anderson, Dennis Sweeney, Thomas Williams, Jeffrey cam
Posted Date:
Students also viewed these electrical engineering questions
-
A small furniture maker has just received an order to deliver 250 chairs at the beginning of week 6. The production/purchase planner needs to arrange for the assembly of subassemblies and purchase of...
-
ERP software has thousands of options from which to choose when the software is configured so that the system can be tailored to the special characteristics of each company. Why couldn't an ERP be...
-
A rental car company has an imbalance of cars at seven of its locations. The following network shows the locations of concern (the nodes) and the cost to move a car between locations. A positive...
-
Factor each trinomial. 4(m 5)2 4(m 5) 15
-
Team up with another student and exchange your revised versions of Message 6.A (in the exercises under "Messages for Analysis"). Evaluate each other's work to see if it could be improved. After you...
-
(a) Show that for any probability distribution, if we compute the generating function \(Z(\beta) \equiv\left\langle e^{\beta X} ightangle\) for arbitrary \(\beta\) and \(X\) being the stochastic...
-
Two residents of California filed a lawsuit against Hertz Corporation on behalf of a group of people arguing that the companys labor practices were illegal. The corporation was labeling workers as...
-
Isadores Implements, Inc., manufactures pens and mechanical pencils often used for gifts. Overhead costs are currently allocated using direct labor-hours, but the controller has recommended an...
-
Student Name: Anthony Jedruczek (Please PRINT your name) Assume that Q-Caf has the following transactions related to the sale of coffee beans during the month of October, 2023. Oct 1 Oct 5 Oct 15 Oct...
-
1. A saturated sample of soil weighed 138.89g before drying and 112.89 after drying.If the dimensions of the sample were 35mm diameter and 70mm long, calculate: 2. The voids ratio to 3 decimal...
-
Anna is the owner of an online sporting goods company, Unique Sports, that features a wide assortment of specialty sporting goods. She launched her website two years ago and she has seen fairly...
-
The finance manager of BIVA Property Master Ltd (BPML) informed in one the shareholders meeting that the company wants to acquire debt of $ 10,000 which is amortized by making equal payments at the...
-
Overview A binary search tree is a common tool for storing data that we want to retrieve quickly. In this assignment we will build a naive binary search tree. We call it 'naive' because it will not...
-
check the below code and run it after completing the requirenment? Base classes: + Person ++ attributes: givenName (String), lastName (String), age (int), gender (String), citizenship (String) +...
-
How can I redo this so that it doesn't have "static" in front of double, int, and Scanner under defining variables? import java.util.*; public class chpt6 { //Declaring global variables static...
-
If VLC = $1,600, price is $20 per item, contribution margin = 20%, and the repurchasing frequency is once every six years, (a) what is the defection rate, and (b) what is the retention rate
-
2. What are some of the benefits and costs associated with legal abortion? Do you think individuals use marginal benefit and marginal cost analysis when considering legal abortion? 3. How does legal...
-
Frontland Advertising creates, plans, and handles advertising campaigns in a three-state area. Recently, Frontland had to replace an inexperienced office worker in charge of bookkeeping because of...
-
Hilltop Coffee manufactures a coffee product by blending three types of coffee beans. The cost per pound and the available pounds of each bean are as follows: Consumer tests with coffee products were...
-
A sample of 100 customers of Montana Gas and Electric resulted in the following frequency distribution of monthly charges. Amount ($) Number 049 ......... 13 5099 ......... 22 100149 ........ 34...
-
The reference desk of a university library receives requests for assistance. Assume that a Poisson probability distribution with an arrival rate of 10 requests per hour can be used to describe the...
-
(a) A photon of energy \(E_{0}\) strikes a free electron at rest in the lab. ("Free" here means the electron is not bound inside an atom.) Is it possible for the photon to be absorbed by the...
-
The quantity \(\lambda_{C} \equiv h / m_{e} c\) is called the "Compton wavelength" of the electron. (a) If a photon scatters off an electron at rest with scattering angle \(\theta=45^{\circ}\), what...
-
The Captain of an interstellar photon-rocket spaceship wishes to maintain a constant acceleration \(a\) in the instantaneous rest-frame of the ship, since that would provide a constant effective...
Study smarter with the SolutionInn App