Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 Converting Seconds to Days:Hours:Minutes:Seconds A day has 8 6 , 4 0 0 seconds ( 2 4 6 0 6 0 ) . Given

2 Converting Seconds to Days:Hours:Minutes:Seconds
A day has 86,400 seconds (246060). Given a number of seconds in the range of 0 to 1,000,000 seconds, your program should print the time as days, hours, minutes, and seconds for a 24 hour clock. For example, 70,000 seconds is 0 days, 19 hours, 26 minutes, and 40 seconds. Your program should accept user input for the number of seconds to convert and then use that number in your calculations. Format your output as follows:
The time is W days, x hours, Y minutes, and Z seconds.
Problem 2.a. Explicitly list the variables you will need and their data types. seconds to miny: scoond hour in day: hour to-day/
Problem 2.b. What arithmetic operators will be most useful for this problem? 1 Division
% Modulus
Problem 2.c. Write out the steps you would use to solve this problem by hand as pseudocode. in put seands % second_in ou
input second/se cond. to. min, min_to. bouf % hour_ta_day infut second/secord_to _ming/minto hourt how to to doei, infut = duy - hour - min - sec -
Problem 2.d. Pick a random number between 0 and 1,000,000 for a sample run. Follow the steps you wrote from part c for this number to find your end result, and verify it.643,00060Ninl1071660 minto how suce 10
su 39,6
1781247
0.611-retern
2199,616036,6660
34
36
7D.10Hr.36min40s
Problem 2.e. Translate your pseudocode into a c++ program to solve the above code.
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

=+26.14. 1 Show that y has no point masses if 2(t) is integrable.

Answered: 1 week ago

Question

Identify conflict triggers in yourself and others

Answered: 1 week ago