SOURCE CODE OUTPUT
#include<iostream>
using namespace std;
int main()
{
int hour,minute,sec,sec1;
cout<<"Enter seconds ";
cin>>sec;
sec1=sec;
minute=sec/60;
sec=sec-minute*60;
hour=minute/60;
minute=minute-hour*60;
cout<<sec1<<" seconds = "<<hour<<" hour "<<minute<<" minute "<<sec<<" second";
}
using namespace std;
int main()
{
int hour,minute,sec,sec1;
cout<<"Enter seconds ";
cin>>sec;
sec1=sec;
minute=sec/60;
sec=sec-minute*60;
hour=minute/60;
minute=minute-hour*60;
cout<<sec1<<" seconds = "<<hour<<" hour "<<minute<<" minute "<<sec<<" second";
}
Any questions regarding to program please write in comments.
No comments:
Post a Comment