【文件属性】:
文件名称:时间表的程序
文件大小:627B
文件格式:CPP
更新时间:2016-05-03 15:09:02
C++代码
#include
#include
void main()
{
int second,minute,hour,delay;
do
{
cout<<"输入错误,请输入24小时制的起始时间(时:分:秒:):";
cin>>hour>>minute>>second;
}while(!(hour>=0 && hour<=24) || !(minute>=0 && minute<=60) || !(second>=0 && second<=60));
while(true)
{
for(;second<=60;second++)
{
for(delay=0;delay<=220000000;delay++)
{continue;}
if(second==60)
{minute++;second=0;}
if(minute==60)
{hour++;minute=0;}
if(hour==24)
hour=0;
cout<<"现在时间:"<