//C++ Primer Plus -- Chapter 3--4
#include <iostream>
using namespace std;
const int sec_to_min=60;
const int min_to_hour=60;
const int hour_to_day=24;
int main ()
{
long second;
cout<<"Enter the number of seconds:";
cin>>second;
int seconds=second%sec_to_min;
int minutes=second/sec_to_min%min_to_hour;
int hours=second/(sec_to_min*min_to_hour)%hour_to_day;
int days=second/(sec_to_min*min_to_hour*hour_to_day);
cout<<second<<" seconds= "<<days <<" days,"<<hours<<" hours,"<<minutes<<" minutes,"<<seconds<<" seconds";
return 0;
}