You are required to develop a program that calculates the overtime pay of the staff in ABC Company. Each staff is required to work 40 hours per week. For each extra hour they work, they will be given additional 50% of their hourly wages as overtime payment. For example, the hourly wages of John is RM55.00. He has worked for 46 hours this week. Therefore his total wages for this week is as follows: 46*55.0 + 55.0* (6*0.5) = 2530.00+ 165.00 = RM2695.00 Write a C++ program that asks the user to enter their hourly wage and the number of hours they worked. Then report their weekly salary, taking into account overtime pay for any hours over 40. An example is shown below. Note the output shows "RM2 695.00" and not "RM2 695". Enter hourly wage: 55 Enter hours: 46 You have earned RM2695.00 Enter hourly wage: 55 Enter hours: 34 You have earned RM1870.00. You are underworked. Display this if hours < 40 Remark: You shall appropriately use at least one constant in your program.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

By using C++, please provide the code, flowchart and screenshot of the program output thanks.

You are required to develop a program that calculates the overtime pay of the staff in ABC
Company. Each staff is required to work 40 hours per week. For each extra hour they work, they
will be given additional 50% of their hourly wages as overtime payment. For example, the hourly
wages of John is RM55.00. He has worked for 46 hours this week. Therefore his total wages for this
week is as follows:
46*55.0 + 55.0* (6*0.5) = 2530.00+ 165.00 = RM2695.00
Write a C++ program that asks the user to enter their hourly wage and the number of hours they
worked. Then report their weekly salary, taking into account overtime pay for any hours over 40.
An example is shown below. Note the output shows "RM2 6 95.00" and not "RM2 695".
Enter hourly wage: 55
Enter hours: 34
Enter hourly wage: 55
Enter hours: 46
You have earned RM2695.00
You have earned RM1870.00.
You are underworked.+
Display this if hours < 40
Remark: You shall appropriately use at least one constant in your program.
Transcribed Image Text:You are required to develop a program that calculates the overtime pay of the staff in ABC Company. Each staff is required to work 40 hours per week. For each extra hour they work, they will be given additional 50% of their hourly wages as overtime payment. For example, the hourly wages of John is RM55.00. He has worked for 46 hours this week. Therefore his total wages for this week is as follows: 46*55.0 + 55.0* (6*0.5) = 2530.00+ 165.00 = RM2695.00 Write a C++ program that asks the user to enter their hourly wage and the number of hours they worked. Then report their weekly salary, taking into account overtime pay for any hours over 40. An example is shown below. Note the output shows "RM2 6 95.00" and not "RM2 695". Enter hourly wage: 55 Enter hours: 34 Enter hourly wage: 55 Enter hours: 46 You have earned RM2695.00 You have earned RM1870.00. You are underworked.+ Display this if hours < 40 Remark: You shall appropriately use at least one constant in your program.
Expert Solution
steps

Step by step

Solved in 5 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY