Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a program that calculates weekly pay for group of hourly workers. Design appropriate prompts and outputs of your own design. The program should prompt

Develop a program that calculates weekly pay for group of hourly workers. Design appropriate prompts and outputs of your own design. The program should prompt for the number of hours worked in the week and the hourly rate. Generate the gross weekly pay and print it. Hours over 40 should be paid at time and a half hourly rate. Use a sentinel value to terminate data entry.

Note: For this program, it is acceptable to use float or double data types for monetary units. However, you should never use float and double data types for monetary unit.

Bonus (5 points). Write a small program that illustrates the dangers of using floats (or doubles) for monetary units.

Please use only C language and NOT C++ or Java You are now also allowed to use the following for loops math.h and pow() function formatting float and double numbers switch statements getchar() function ASCII chart dowhile loops break and continue statements Logical AND (&&), logical OR (||), logical NOT (!) operators

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+Is the fear relevant to the issue?

Answered: 1 week ago

Question

Can workers be trained in ethics? How? Defend your answer.

Answered: 1 week ago