Problem

(Assume the user enters 36720152. Use a calculator.)#include #include using namespace std;...

(Assume the user enters 36720152. Use a calculator.)

#include #include using namespace std;int main( ){ long seconds; double minutes, hours, days, months, years; cout ≪ "Enter the number of seconds that have\n"; cout ≪ "elapsed since some time in the past and\n"; cout ≪ "I will tell you how many minutes, hours,\n"; cout ≪ "days, months, and years have passed: "; cin ≫ seconds; minutes = seconds / 60; hours = minutes / 60; days = hours / 24; years = days / 365; months = years * 12; cout ≪ setprecision(4) ≪ fixed ≪ showpoint ≪ right; cout ≪ "Minutes: " ≪ setw(6) ≪ minutes ≪ endl; cout ≪ "Hours: " ≪ setw(6) ≪ hours ≪ endl; cout ≪ "Days: " ≪ setw(6) ≪ days ≪ endl; cout ≪ "Months: " ≪ setw(6) ≪ months ≪ endl; cout ≪ "Years: " ≪ setw(6) ≪ years ≪ endl; return 0;}

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT