PART D. Write a program HourConverter which asks the user to enter a number of hours and outputs the equivalent duration in weeks+days+hours. (Hint: Use the division and mod operator.) Here are some examples: Enter a number of hours: 7 hours is 0 weeks, 0 days, and 7 hours

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 30SA
icon
Related questions
Question

Not allowed to use decisions or loops, if then statements, I haven't learned that. I have to use division and modulus.

PART D. Write a program HourConverter which asks the user to enter a number of hours and outputs the
equivalent duration in weeks+days+hours. (Hint: Use the division and mod operator.) Here are some examples:
Enter a number of hours:
7 hours is 0 weeks, 0 days, and 7 hours
Transcribed Image Text:PART D. Write a program HourConverter which asks the user to enter a number of hours and outputs the equivalent duration in weeks+days+hours. (Hint: Use the division and mod operator.) Here are some examples: Enter a number of hours: 7 hours is 0 weeks, 0 days, and 7 hours
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Structure chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning