Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Could u fix this error and rewrite the correct one for me? A day has 86,400 seconds (24*60*60). Given a number of seconds in

image text in transcribed

C++

Could u fix this error and rewrite the correct one for me?

A day has 86,400 seconds (24*60*60). Given a number of seconds in the range of 0 to 1,000,000 seconds, your function should output (print to the console) the value in seconds, followed by the time as days, hours, minutes, and seconds for a 24- hour clock. Example output: 70000 seconds is 0 days, 19 hours, 26 minutes, and 40 seconds. ++Your function should have one input value: the number of seconds as an integer parameter. + Your function should print/display/output the value in seconds, followed by the time as days, hours, minutes, and seconds like the format given above. ++Your function should not return any value. +Your function MUST be named howLong. For example: Test howLong (70000) 70000 seconds is 0 days, 19 hours, 26 minutes, and 40 seconds Result Answer: (penalty regime: 0 %) |#includeiostream > 2 using namespace std; 3 int main() 1 4 5 int n, hour,minute,second, day; 6 cout

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

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students also viewed these Databases questions