Question: Write a program with total time in seconds, input as a long long integer. Then output the number of years, months, days, hours, minutes, and


Write a program with total time in seconds, input as a long long integer. Then output the number of years, months, days, hours, minutes, and seconds. Use singular and plural names as appropriate, like 1 hour vs. 2 hours. You can assume the following: A year has 12 months A month has 30 days A day has 24 hours An hour has 60 minutes A minute has 60 seconds Ex: If the input is: 33786061 the output is: 1 Year 1 Month 1 Day 1 Hour 1 Minute 1 Second Ex: If the input is: 158123286 the output is: 5 Years 1 Month 3 Hours 8 Minutes 6 Seconds Ex: If the input is: 187488015 the output is 6 Years 10 Days 15 Seconds Your program must define and call the following function that receives as input the total amount and prints out each denomination of time. void PrintSeconds (long long int TotalSeconds) 301608.1764500 LAB ACTIVITY 16.35.1: Lab 5, P2(T): Convert seconds - functions 0/6 main.c Load default template... 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
