j

Monday, 2 November 2015

Write a program that take time in second and then convert the tim into hh;mm;ss



#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int ss,mm,hh;
cout<<"Enter time in second ::";
cin>>ss;
hh=ss/3600;
ss=ss%3600;
mm=ss/60;
ss=ss%60;
cout<<hh<<":"<<mm<<":"<<ss;
getch();
}

Subscribe to this Blog via Email :