//Xinnuo Wang CS1A chapter 4, p.221 #7
//
/*******************************************************************************
*
* Display Time
* _____________________________________________________________________________
* This program accepts a number of secondsto display in a specific timing
* methods.
*
* Computation is based on the formula:
* time in minutes = seconds / 60
* time in hours = seconds/3600
* time in days = seconds/86400
* _____________________________________________________________________________
* INPUT
* seconds : The accepted number in seconds
* OUTPUT
* time : The specific way to diaplay the seconds
*
******************************************************************************/
#include <iostream>
using namespace std;
int main()
{
int seconds; //INPUT - The accepted number in seconds
int time; //OUTPUT - The specific way to diaplay the seconds
//
//Data Input
cout<<"Enter Number In Seconds"<<endl;
cin>>seconds;
//
//Output
if(seconds>=60&&seconds<3600)
{
time = seconds/60;
cout<< "Time is: " << time<< "minute(s)"<<endl;
}
if(seconds>=3600&&seconds<86400)
{
time = seconds/3600;
cout<< "Time is: " << time<< "hour(s)" <<endl;
}
if(seconds>=86400)
{
time = seconds/86400;
cout<< "Time is: " << time<< "day(s)"<<endl;
}
return 0;
}