Write a program to convert a number of inserted days into years, weeks, days, hours, and minutes. This means that the inserted number doesn't need to be a complete integer and may have a fraction part like 201.3 days. We will assume that the year consists of 365 days exactly to simplify the required work. Example: If 412.71 days are inserted, the output will be 1 6 5 17 2 which consists of 1 year, 6 weeks, 5 days, 17 hours, and 2 minutes. IMPORTANT NOTE 1/0 . Do not add any cout statements except for the final answer as specified above. . Do not add "Enter the number of days", "the output is" or any similar prompts. • Do not add any unnecessary spaces. Notice that there is a single space between every two numbers in the output. • You may add any libraries needed. Program Input: A number of days Program Output: The number of years, weeks, days, hours, and minutes included in the inserted number of days.

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

c++

Sample Testcase 0:
Input:
700
Output:
1 47 600
Sample Testcase 1:
Input:
845.49
Output:
2 163 11 45
There are some errors in your answer. Your score is 40.0%. [Submission #63624dc2987078e230650755]
Compiling student code ....
Compilation suceeded
Transcribed Image Text:Sample Testcase 0: Input: 700 Output: 1 47 600 Sample Testcase 1: Input: 845.49 Output: 2 163 11 45 There are some errors in your answer. Your score is 40.0%. [Submission #63624dc2987078e230650755] Compiling student code .... Compilation suceeded
Write a program to convert a number of inserted days into years, weeks, days, hours, and minutes. This means
that the inserted number doesn't need to be a complete integer and may have a fraction part like 201.3 days. We
will assume that the year consists of 365 days exactly to simplify the required work.
Example: If 412.71 days are inserted, the output will be 1 65 17 2 which consists of 1 year, 6 weeks, 5 days, 17
hours, and 2 minutes.
IMPORTANT NOTE
• Do not add any cout statements except for the final answer as specified above.
. Do not add "Enter the number of days", "the output is" or any similar prompts.
. Do not add any unnecessary spaces. Notice that there is a single space between every two numbers in
the output.
• You may add any libraries needed.
1/0
Program Input:
A number of days
Program Output:
The number of years, weeks, days, hours, and minutes included in the inserted number of days.
Sample Testcase 0:
Transcribed Image Text:Write a program to convert a number of inserted days into years, weeks, days, hours, and minutes. This means that the inserted number doesn't need to be a complete integer and may have a fraction part like 201.3 days. We will assume that the year consists of 365 days exactly to simplify the required work. Example: If 412.71 days are inserted, the output will be 1 65 17 2 which consists of 1 year, 6 weeks, 5 days, 17 hours, and 2 minutes. IMPORTANT NOTE • Do not add any cout statements except for the final answer as specified above. . Do not add "Enter the number of days", "the output is" or any similar prompts. . Do not add any unnecessary spaces. Notice that there is a single space between every two numbers in the output. • You may add any libraries needed. 1/0 Program Input: A number of days Program Output: The number of years, weeks, days, hours, and minutes included in the inserted number of days. Sample Testcase 0:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

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