Question: Write a program that asks the user to enter the number of seconds as an integer value (use type long, or, if available, long long)
Write a program that asks the user to enter the number of seconds as an integer value (use type long, or, if available, long long) and that then displays the equivalent time in days, hours, minutes, and seconds. Use symbolic constants to represent the number of hours in the day, the number of minutes in an hour, and the number of seconds in a minute.The output should look like this:
Enter the number of seconds: 31600000
31600000 seconds = 365 days, 17 hours, 46 minutes, 40 seconds
Step by Step Solution
3.41 Rating (176 Votes )
There are 3 Steps involved in it
include using namespace std int main long long seconds const int MINSPERHOUR 60 const int HOURSPE... View full answer
Get step-by-step solutions from verified subject matter experts
