呵呵呵,欢迎欢迎啊
今天是小明爸的生日,小明要为爸爸在程序上写300个爸爸生日快乐
于是他是这么写的
保证准确300个 cout
#include<iostream>
using namespace std;
int main(){
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
cout<<"爸爸生日快乐!"<<endl;
return 0;
}
可是这么累,小明于是开始了他的进阶之路……………………………………
努力中…………
努力中…………
努力中…………
努力中…………
努力中…………
之后他把程序优化了一下
变成了for循环
#include<iostream>
using namespace std;
int main(){
for(int i=1;i<=300;i++){
cout<<"爸爸生日快乐!\n";
}
return 0;
}
嗯嗯,回到正题
for用在知道循环次数的情况下,执行相同的动作
循环顺序:
好了,晚安!!
投票结果:好困
|