Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Weekly Pay Write a program WeeklyPay.c that computes the weekly earned income of hourly workers. The program should ask the user to enter the hourly

image text in transcribed

Weekly Pay Write a program WeeklyPay.c that computes the weekly earned income of hourly workers. The program should ask the user to enter the hourly pay rate and the number of hours worked. It should then output the amount earned with two digits after the decimal point. The program should take into consideration overtime pay. Any number of hours worked beyond 40 hours are compensated by 1.5 times the regular hourly pay. The following is a sample run of the program Enter the hourly rate (S): 17.52 Enter the number of hours worked: 43 Weekly earnings (S): 779.64 Update your program so it asks the user if he wants to compute another weekly pay. If the user enters n or N then the program should exit. Otherwise, it should repeat for a new iteration A sample run is as follows Enter the hourly rate (S): 17.52 Enter the number of hours worked: 43 Weekly earnings (S): 779.64 Do you want to compute another pay? Y Enter the hourly rate (S): 10.40 Enter the number of hours worked: 5 ***Weekly earnings (S): 52.00 Do you want to compute another pay? Y Enter the hourly rate (S): 22.50 Enter the number of hours worked: 40 Weekly earnings (): 900.00 Do you want to compute another pay? N

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions