/ Vijos /

用户

个人简介

......
time

#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main()
{
    int h,m,s;
    cin>>h>>m>>s;
    HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_CURSOR_INFO cursor_info = {1, 0};
    SetConsoleCursorInfo(hOut, &cursor_info);
    system("cls");
    while(true)
    {
        if(h>9)cout<<h<<":";
        else cout<<0<<h<<":";
        if(m>9)cout<<m<<":";
        else cout<<0<<m<<":";
        if(s>9)cout<<s;
        else cout<<0<<s;
        Sleep(1000);s++;
        if(s>59)s=0,m++;
        if(m>59)m=0,h++;
        if(h>23)h=0;        
        system("cls");
    }
    return 0;
}