#include <iostream> #include <windows.h> using namespace std; int main() { while(true) { cout<<"每5秒输出一次"<<endl; Sleep(5000); //S要大写 } return 0; }