C How to Program (8th Edition)
C How to Program (8th Edition)
8th Edition
ISBN: 9780133976892
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 4, Problem 4.28E

(Calculating Weekly Pay)A company pays its employees as managers (who receive a fixed weekly salary), hourly workers (who receive a fixed hourly wage for up to the first 40 hours they work and “time-and-a-half”—i.e., 1.5 times their hourly wage—for overtime hours worked),commission workers (who receive $250 plus 5.7% of their gross weekly sales), or pieceworkers(who receive a fixed amount of money for each of the items they produce—each pieceworker in this company works on only one type of item). Write a program to compute the weekly pay for each employee. You do not know the number of employees in advance. Each type of employee has its own pay code: Managers have paycode 1, hourly workers have code 2, Commission workers have code 3 and pieceworkers have code 4. Use a switch to compute each employee’s pay based on that employee’s paycode. Within the switch, prompt the user (i.e., the payroll clerk) to enter the appropriate facts your program needs to calculate each employee’s pay based on that employee’s paycode. [Note: You can input values of type double using the conversion specifier %1f with scanf.]

Blurred answer
08:26
Students have asked these similar questions
Computer Science Please help   You went camping overnight but forgot to take with you a heater and need to make one using a dc battery of V0 and spare electrical wires of different lengths and resistivity. The battery has lead with the resistance of Rw.   Please obtain the formula for the joule heat power and plot it as a function of RH ( in MATLAB) and in comparison to the resistance of the connecting leads, Rw. (Note: express RH = x Rw, where x is the effective ratio; vary x and plot Pmax vs. x). and Find the heating power if the heater is made out of superconducting metal. Will this heater work and why?! What is to happen on the molecular ( i.e. electron) level ?!
State whether the following are true or false. If the answer is false, explain why.b) The break statement is required in the default case of a switch selection statement.
State whether each of the following is true or false. If false, explain why i) The remainder operator (%) can be used only with integer operands

Chapter 4 Solutions

C How to Program (8th Edition)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Boolean Algebra - Digital Logic and Logic Families - Industrial Electronics; Author: Ekeeda;https://www.youtube.com/watch?v=u7XnJos-_Hs;License: Standard YouTube License, CC-BY
Boolean Algebra 1 – The Laws of Boolean Algebra; Author: Computer Science;https://www.youtube.com/watch?v=EPJf4owqwdA;License: Standard Youtube License