小闹钟

简介

你从来没有玩过的船新版本

当前版本只支持倒计时(巨水

Source Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include<cstdlib>
#include<windows.h>
#include<iostream>
using namespace std;
int main()
{
int hour,second,minute;
cout<<"输入格式\"时 分 秒\""<<endl;
cin>>hour>>minute>>second;
if(minute==60&&second>0)
{
cout<<"Input error!"<<endl;
}
else
{
if(minute>60||second>60)
cout<<"Input error!"<<endl;
else
{
for(int i=3600*hour+60*minute+second;i>0;Sleep(1000),i--)
{
system("cls");
if((minute)<0)
{
hour-=1;
minute=60;
}
if((second-1)<0)
{
minute-=1;
second=60;
}
if(second<10&&minute<10)
{
second--;
cout<<hour<<":0"<<minute<<":0"<<second<<endl;
}
if(second<10&&minute>=10)
{
second--;
cout<<hour<<":"<<minute<<":0"<<second<<endl;
}
if(second>=10&&minute<10)
{
second--;
cout<<hour<<":0"<<minute<<":"<<second<<endl;
}
if(second>=10&&minute>=10)
{
second--;
cout<<hour<<":"<<minute<<":"<<second<<endl;
}
}
for(int i=10;i>0;i--)
{
cout<<"\a"<<endl;
Sleep(1000);
}
}
}
return 0;
}
# 技术
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×