编程语言
首页 > 编程语言> > C++ 时分秒的无限循环打印

C++ 时分秒的无限循环打印

作者:互联网

#include <iostream>
#include <string>
#include <windows.h>
using namespace std;
int main() {
    int count = 0;
    for (int i=0;i < 24; i++){
        for (int j = 0; i < 60; j++) {
            for (int k = 0; k < 60; k++) {
                count++;
                cout << i << ":" << j << ":" << k << " 第" << count << "次想念你" << endl;
                Sleep(1000);
            }
        }
    }
    system("pause");
    return 0;
}

 

标签:count,std,int,打印,C++,60,++,include,时分秒
来源: https://www.cnblogs.com/smartlearn/p/16585962.html