conversion of
hours, minutes and seconds into seconds
#include
"stdafx.h"
#include
"conio.h"
#include
"stdio.h"
#include"iostream"
using namespace std;
int _tmain(int argc,
_TCHAR* argv[])
{
int h,m,s,time; // h is hours, m is minutes , s is seconds
cout<<"enter h,m,s";
cin>>h>>m>>s;
time=(h*60*60)*(m*60)*s;
cout<<"time="<<time<<"s";
getch();
}
0 comments :
Post a Comment