rt,想达到从HHH->HeHeHe->HelHelHel->HellHellHell->HelloHelloHello,一定只能这么写吗(代码见下).
#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; }
有没有什么优化代码行数的途径,特别感谢!