(Financial application: payroll) mation and prints a payroll stater Employee's name (e.g., Smith Number of hours worked in a Hourly pay rate (e.g., 9.75) Federal tax withholding rate ( State tax withholding rate (e.s

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section: Chapter Questions
Problem 6PP
icon
Related questions
Question
(Financial application: payroll) Write a program that reads the following infor-
mation and prints a payroll statement:
Employee's name (e.g., Smith)
Number of hours worked in a week (e.g., 10)
Hourly pay rate (e.g., 9.75)
Federal tax withholding rate (e.g., 20%)
State tax withholding rate (e.g., 9%)
A sample run is shown below:
Enter employee's name: Smith
Enter number of hours worked in a week: 10
Enter
-Enter
Enter hourly pay rate: 9.75
Enter federal tax withholding rate: 0.20
-Enter
-Enter
Enter state tax withholding rate: 0.09
Enter
Employee Name: Smith
Transcribed Image Text:(Financial application: payroll) Write a program that reads the following infor- mation and prints a payroll statement: Employee's name (e.g., Smith) Number of hours worked in a week (e.g., 10) Hourly pay rate (e.g., 9.75) Federal tax withholding rate (e.g., 20%) State tax withholding rate (e.g., 9%) A sample run is shown below: Enter employee's name: Smith Enter number of hours worked in a week: 10 Enter -Enter Enter hourly pay rate: 9.75 Enter federal tax withholding rate: 0.20 -Enter -Enter Enter state tax withholding rate: 0.09 Enter Employee Name: Smith
ematical Functions, Strings, and Objects
Hours Worked: 10.0
Pay Rate: $9.75
Cross Pay: $97.5
Deductions:
Federal Withholding (20.0%): $19.5
State Withholding (9.0%): $8.77
Total Deduction: $28.27
Net Pay: $69.22
Transcribed Image Text:ematical Functions, Strings, and Objects Hours Worked: 10.0 Pay Rate: $9.75 Cross Pay: $97.5 Deductions: Federal Withholding (20.0%): $19.5 State Withholding (9.0%): $8.77 Total Deduction: $28.27 Net Pay: $69.22
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr