Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Coding Your program will make use of long long int variables for all calculations. Note: the use of long long int requires that you

C++ Coding

image text in transcribedimage text in transcribed

Your program will make use of long long int variables for all calculations. Note: the use of long long int requires that you have ++11 support. You should have this automatically if you are using a newer version of Visual Studio. The support is there for GCC as well, but you may need the -std-c++11 or -std-c++0x compiler flag. You first need to read in the total number of seconds. Your should then output this value as follows: Total seconds: xxx Where xxx is the number of seconds you read in. If this value is O or less you need to output the message Total seconds must be greater than zero For example, assume the input is: 102 The output will be as follows: Total seconds: -102 Total seconds must be greater than zero If the number is more than zero you need to calculate the number of days, hours, minutes and seconds. The value for hours should be after you have subtracted off the number of days. The value for minutes will be the number of minutes after you have subtracted the days and hours. Seconds will be the remainder after you have subtracted the days, hours and minutes You should only output the days if the number of days is more than 0. You should only output the hours if the number of hours is more than 0. You should only output the minutes if the number of minutes is more than 0 and you should only output the seconds if the number of seconds is greater than 0 For example, assume the input is: 90061

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

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago