如何使用Sleep函数
  • 板块灌水区
  • 楼主best_lover
  • 当前回复6
  • 已保存回复6
  • 发布时间2024/4/21 16:05
  • 上次更新2024/4/21 18:08:47
查看原帖
如何使用Sleep函数
359485
best_lover楼主2024/4/21 16:05

rt,想达到从HH->HeHe->HelHel->HellHell->HelloHello,一定只能这么写吗(代码见下).

#include<bits/stdc++.h>
#include<windows.h>
#define s1 Sleep(100);
using namespace std;
int main(){
  cout<<"H"; s1
  cout<<"e"; s1
  cout<<"l"; s1
  cout<<"l"; s1
  cout<<"o"; s1
  return 0;
}

有没有什么优化代码行数的途径,特别感谢!

2024/4/21 16:05
加载中...