The author spent an afternoon writing it.
A time management guru written in c++.
Back it up.
#include<bits/stdc++.h>
#include<>
using namespace std;
const int pai = 250;
const int ban = pai/2;
#define D1 262
#define D2 294
#define D3 330
#define D4 349
#define D5 392
#define D6 440
#define D7 494
#define M1 523
#define M2 578
#define M3 659
#define M4 698
#define M5 784
#define M6 880
#define M7 988
#define G1 1046
#define G2 1175
#define G3 1318
#define G4 1480
#define G5 1568
#define G6 1760
#define G7 1976
void BAN(int sound) {
Beep(sound, ban);
Sleep(ban);
}
void PAI(int sound) {
Beep(sound, pai);
Sleep(pai);
}
void SI(int sound) {
Beep(sound, ban/2);
Sleep(ban/2);
}
#define WAIT Sleep
#define PAIU pai
#define BANU ban
void SetConsoleFontSize(int size) {
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_FONT_INFOEX fontInfo;
= sizeof(CONSOLE_FONT_INFOEX);
GetCurrentConsoleFontEx(hConsole, FALSE, &fontInfo);
= size;
SetCurrentConsoleFontEx(hConsole, FALSE, &fontInfo);
}
void SetConsoleWindowSize(int width, int height) {
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
COORD bufferSize;
= width;
= height;
SetConsoleScreenBufferSize(hConsole, bufferSize);
SMALL_RECT windowSize = {0, 0, width - 1, height - 1};
SetConsoleWindowInfo(hConsole, TRUE, &windowSize);
}
int main() {
SetConsoleFontSize(20);
SetConsoleWindowSize(30,5);
cout<<"Please enter the time\n";
cout<<"Enter three numbers,xhour,yingredient,zunit of angle or arc equivalent one sixtieth of a degree\n";
// SetConsoleFontSize(100);
// SetConsoleWindowSize(16,4);
int x,y,z;
cin>>x>>y>>z;
if(z>=60)
{
while(z>=60)
{
z-=60;
y++;
}
}
if(y>=60)
{
while(y>=60)
{
y-=60;
x++;
}
}
cout<<"你要记hour"<<x<<"hour"<<y<<"ingredient"<<z<<"unit of angle or arc equivalent one sixtieth of a degree"<<endl;
Sleep(2000);
system("cls");
cout<<"For technical reasons,暂停需要延hour一unit of angle or arc equivalent one sixtieth of a degree\n";
Sleep(2000);
cout<<"Pressing space will start the,Press pause again.\n一unit of angle or arc equivalent one sixtieth of a degree后即将开始"<<endl;
Sleep(1000);
if(y==z&&y==0)
{
x--;
for(int i=x;i>=0;i--)
{
for(int j=59;i>=0;j--)
{
for(int k=59;k>=0;k--)
{
system("cls");
if(GetAsyncKeyState(VK_SPACE))
{
cout<<"剩余hour间"<<endl;
cout<<i<<":"<<j<<":"<<k<<endl;
cout<<"Currently suspended..."<<endl;
while(!GetAsyncKeyState(VK_SPACE))
Sleep(1);
system("cls");
}
cout<<"剩余hour间"<<endl;
cout<<i<<":"<<j<<":"<<k<<endl;
cout<<"running..."<<endl;
if(GetAsyncKeyState(VK_SPACE))
{
system("cls");
cout<<"剩余hour间"<<endl;
cout<<i<<":"<<j<<":"<<k<<endl;
cout<<"Currently suspended..."<<endl;
while(!GetAsyncKeyState(VK_SPACE))
Sleep(1);
system("cls");
cout<<"剩余hour间"<<endl;
cout<<i<<":"<<j<<":"<<k<<endl;
cout<<"running..."<<endl;
}
Sleep(1000);
}
}
}
}
else
{
for(int j=z;j>=0;j--)
{
system("cls");
if(GetAsyncKeyState(VK_SPACE))
{
cout<<"剩余hour间"<<endl;
cout<<x<<":"<<y<<":"<<j<<endl;
cout<<"Currently suspended..."<<endl;
while(!GetAsyncKeyState(VK_SPACE))
Sleep(1);
system("cls");
}
cout<<"剩余hour间"<<endl;
cout<<x<<":"<<y<<":"<<j<<endl;
cout<<"running..."<<endl;
if(GetAsyncKeyState(VK_SPACE))
{
system("cls");
cout<<"剩余hour间"<<endl;
cout<<x<<":"<<y<<":"<<j<<endl;
cout<<"Currently suspended..."<<endl;
while(!GetAsyncKeyState(VK_SPACE))
Sleep(1);
system("cls");
cout<<"剩余hour间"<<endl;
cout<<x<<":"<<y<<":"<<j<<endl;
cout<<"running..."<<endl;
}
Sleep(1000);
}
y--;
for(int i=y;i>=0;i--)
{
for(int j=59;j>=0;j--)
{
system("cls");
if(GetAsyncKeyState(VK_SPACE))
{
cout<<"剩余hour间"<<endl;
cout<<x<<":"<<i<<":"<<j<<endl;
cout<<"Currently suspended..."<<endl;
while(!GetAsyncKeyState(VK_SPACE))
Sleep(1);
system("cls");
}
cout<<"剩余hour间"<<endl;
cout<<x<<":"<<i<<":"<<j<<endl;
cout<<"running..."<<endl;
if(GetAsyncKeyState(VK_SPACE))
{
system("cls");
cout<<"剩余hour间"<<endl;
cout<<x<<":"<<i<<":"<<j<<endl;
cout<<"Currently suspended..."<<endl;
while(!GetAsyncKeyState(VK_SPACE))
Sleep(1);
system("cls");
cout<<"剩余hour间"<<endl;
cout<<x<<":"<<i<<":"<<j<<endl;
cout<<"running..."<<endl;
}
Sleep(1000);
}
}
x--;
for(int i=x;i>=0;i--)
{
for(int j=59;i>=0;j--)
{
for(int k=59;k>=0;k--)
{
system("cls");
if(GetAsyncKeyState(VK_SPACE))
{
cout<<"剩余hour间"<<endl;
cout<<i<<":"<<j<<":"<<k<<endl;
cout<<"Currently suspended..."<<endl;
while(!GetAsyncKeyState(VK_SPACE))
Sleep(1);
system("cls");
}
cout<<"剩余hour间"<<endl;
cout<<i<<":"<<j<<":"<<k<<endl;
cout<<"running..."<<endl;
if(GetAsyncKeyState(VK_SPACE))
{
system("cls");
cout<<"剩余hour间"<<endl;
cout<<i<<":"<<j<<":"<<k<<endl;
cout<<"Currently suspended..."<<endl;
while(!GetAsyncKeyState(VK_SPACE))
Sleep(1);
system("cls");
cout<<"剩余hour间"<<endl;
cout<<i<<":"<<j<<":"<<k<<endl;
cout<<"running..."<<endl;
}
Sleep(1000);
}
}
}
}
system("cls");
cout<<"hour间到!!"<<endl;
BAN(M6);
PAI(M6);
BAN(M5);
BAN(M6);
PAI(M6);
BAN(M5);
BAN(M6);
PAI(M6);
BAN(M5);
BAN(M6);
PAI(G1);
BAN(M6);
PAI(M6);
BAN(M5);
BAN(M6);
PAI(M6);
BAN(M5);
PAI(M6);
PAI(G1);
PAI(G2);
PAI(G3);
BAN(M2);
BAN(M3);
SI(D6);
SI(D5);
SI(D6);
SI(D5);
BAN(M2);
BAN(M3);
SI(D6);
SI(D5);
SI(D6);
SI(D5);
BAN(M2);
BAN(M3);
SI(D6);
SI(D5);
SI(D6);
SI(D5);
BAN(M1);
BAN(D7);
BAN(D6);
BAN(D5);
BAN(M2);
BAN(M3);
SI(D6);
SI(D5);
SI(D6);
SI(D5);
BAN(M2);
BAN(M3);
SI(D6);
SI(D5);
SI(D6);
SI(D5);
BAN(M2);
BAN(M3);
BAN(M5);
BAN(G1);
SI(M7);
SI(G1);
SI(M7);
SI(M6);
BAN(M5);
BAN(M3);
BAN(M2);
BAN(M3);
SI(D6);
SI(D5);
SI(D6);
SI(D5);
BAN(M2);
BAN(M3);
SI(D6);
SI(D5);
SI(D6);
SI(D5);
BAN(M2);
BAN(M3);
SI(D6);
SI(D5);
SI(D6);
SI(D5);
BAN(M1);
BAN(D7);
BAN(D6);
BAN(D5);
BAN(M1);
SI(D6);
SI(M1);
BAN(M2);
SI(M1);
SI(M2);
BAN(M3);
SI(M2);
SI(M3);
SI(M5);
SI(G1);
SI(M3);
SI(M5);
BAN(G1);
BAN(M7);
BAN(M6);
BAN(M5);
PAI(M6);
BAN(M6);
BAN(G1);
for(int i = 0;i < 2;i++)
{
BAN(G2);
BAN(G3);
SI(M6);
SI(M5);
SI(M6);
SI(M5);
BAN(G2);
BAN(G3);
SI(M6);
SI(M5);
SI(M6);
SI(M5);
BAN(G2);
BAN(G3);
SI(M6);
SI(M5);
SI(M6);
SI(M5);
BAN(G1);
BAN(M7);
BAN(M6);
BAN(M5);
BAN(G2);
BAN(G3);
SI(M6);
SI(M5);
SI(M6);
SI(M5);
BAN(G2);
BAN(G3);
SI(M6);
SI(M5);
SI(M6);
SI(M5);
BAN(G2);
BAN(G3);
BAN(G5);
BAN(G1*2);
SI(G7);
SI(G1*2);
SI(G7);
SI(G6);
BAN(G5);
BAN(G3);
BAN(G2);
BAN(G3);
SI(M6);
SI(M5);
SI(M6);
SI(M5);
BAN(G2);
BAN(G3);
SI(M6);
SI(M5);
SI(M6);
SI(M5);
BAN(G2);
BAN(G3);
SI(M6);
SI(M5);
SI(M6);
SI(M5);
BAN(G1);
BAN(M7);
BAN(M6);
BAN(M5);
SI(G3);
SI(G2);
SI(G3);
SI(G5);
SI(G6);
SI(G5);
SI(G3);
SI(G2);
BAN(M6);
BAN(G1);
BAN(G3);
BAN(G5);
BAN(G6);
PAI(G6);
BAN(G5);
PAI(G6);
WAIT(PAIU);
PAI(M6);
BAN(M6);
SI(M5);
BAN(M6);
BAN(G1);
BAN(G2);
BAN(G3);
PAI(M6);
BAN(M6);
SI(M5);
BAN(M6);
BAN(M5);
BAN(M3);
BAN(M5);
PAI(M6);
BAN(M6);
SI(M5);
BAN(M6);
BAN(G1);
BAN(G2);
BAN(G3);
PAI(G3);
PAI(G2);
PAI(G1);
PAI(M6);
PAI(M6);
BAN(M6);
SI(M5);
BAN(M6);
BAN(G1);
BAN(G2);
BAN(G3);
PAI(M6);
BAN(M6);
SI(M5);
BAN(M6);
BAN(M5);
BAN(M5);
BAN(M3);
PAI(M6);
BAN(M6);
SI(M5);
BAN(M5);
BAN(M6);
BAN(G1);
BAN(G2);
PAI(G3);
PAI(G2);
PAI(G1);
PAI(M6);
PAI(G1);
PAI(M7);
PAI(M6);
PAI(M5);
BAN(M5);
SI(M5);
SI(M6);
BAN(M3);
BAN(M2);
PAI(M3);
WAIT(PAIU);
BAN(M3);
BAN(M5);
PAI(M6);
PAI(G2);
PAI(M7);
PAI(G1);
BAN(M7);
BAN(M5);
PAI(M6);
WAIT(PAIU);
PAI(G1);
PAI(M7);
PAI(M6);
PAI(M5);
BAN(M5);
SI(M5);
SI(M6);
BAN(M3);
BAN(M2);
PAI(M3);
BAN(M3);
BAN(M5);
BAN(M6);
PAI(M6);
BAN(M6);
PAI(G1);
PAI(G2);
PAI(M7);
WAIT(PAIU*2);
BAN(M6);
BAN(G1);
BAN(G2);
PAI(G2);
BAN(G3);
PAI(G3);
BAN(G3);
BAN(G5);
BAN(G6);
BAN(G2);
BAN(G1);
PAI(G3);
BAN(M6);
BAN(G1);
BAN(G2);
PAI(G2);
BAN(G3);
PAI(G3);
BAN(G3);
BAN(G3);
BAN(M4);
BAN(M3);
BAN(M2);
BAN(M1);
PAI(M1);
BAN(M6);
BAN(G1);
BAN(G2);
PAI(G2);
BAN(G3);
PAI(G3);
BAN(G3);
BAN(G5);
BAN(G6);
BAN(G2);
BAN(G1);
PAI(G3);
BAN(M6);
BAN(G1);
PAI(M4);
PAI(M3);
PAI(M2);
PAI(M1);
BAN(G1);
BAN(G2);
BAN(M7);
BAN(M5);
PAI(M6);
BAN(M6);
BAN(G1);
BAN(G2);
PAI(G2);
BAN(G3);
PAI(G3);
BAN(G3);
BAN(G5);
BAN(G6);
BAN(G2);
BAN(G1);
PAI(G3);
BAN(M6);
BAN(G1);
BAN(G2);
PAI(G2);
BAN(G3);
PAI(G3);
BAN(G3);
BAN(G3);
BAN(M4);
BAN(M3);
BAN(M2);
BAN(M1);
PAI(M1);
BAN(M6);
BAN(G1);
BAN(G2);
PAI(G2);
BAN(G3);
PAI(G3);
BAN(G3);
BAN(G5);
BAN(G6);
BAN(G2);
BAN(G1);
PAI(G3);
BAN(M6);
BAN(G1);
PAI(M4);
PAI(M3);
PAI(M2);
PAI(M1);
BAN(G1);
BAN(G2);
BAN(M7);
BAN(M5);
PAI(M6);
WAIT(PAIU);
}
}