Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Temp Employers wants a program that allows the company's clerks to enter an employee's name and the total number of hours the employee worked during

Temp Employers wants a program that allows the company's clerks to enter an employee's name and the total number of hours the employee worked during a month. The program should convert the total number of hours worked to the number of weeks (assume a 40-hour work week), days (assume an 8-hour day) , and hours worked.

Notes:

First and last name will be entered by the user and assigned to one string variable

The hours input will always be an integer

Use modulus division to determine the hours left to use for calculating the days and for the final hours left

Output:

Use the printf() method for your output display

If John Jones worked a total of 70 hours during a month, the program should display:

John Jones worked 70 hours, which is 1 week(s), 3 day(s), and 6 hour(s).

Test your code with 70 hours and again with 111 hours. Use whatever names you like

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

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

What are three types of firewalls?

Answered: 1 week ago