#include <ctime>
#include <iostream>
#include <windows.h>
using namespace std ;
void main(void)
{
long in_time, out_time;
int a,b;
cout<<"waiting time(minute)"<<endl;;
cin>>a;
b=a*1000;
time(&in_time); //得到入场时间
cout << "in time: " <<ctime(&in_time) <<endl ;
//停留
Sleep(b); //模拟停三秒
time(&out_time);
cout << "out time: " <<ctime(&out_time) <<endl ;
cout << "stop time: " <<out_time-in_time <<"s"<<endl ;
}
01-04
07-10