中易网

C++用循环语句编程打印如下图案.

答案:4  悬赏:0  
解决时间 2021-02-18 17:17
# ### ##### ####### ######### ########### ############# ################ ################## ####################
最佳答案
#include <iostream>
using namespace std;

int main()
{
for(int i=1; i<=10*3; i+=2)
{
for(int j=0; j<i; j++)
{
cout<<"#";
}
cout<< endl;
}
return 0;
}
全部回答
分都没。打个毛。 不过还是好心给个思路你吧 for(i=0;i<10;i++) { for(j=0;j<i;j++) { printf("#"); } printf("\n"); } 就是用一个嵌套循环 变量自己定义
钱能的书,嘿嘿 vs2008编译通过 #include #include using namespace std; int main(){ for(int j=1;j<12;j++){ cout< for(int i=1;i<(24-2*j);i++) if (i%2) cout<<"s"; else cout<<"t"; cout<
  • 3楼网友:星星坠落
  • 2021-02-17 23:03
#include <iostream> using namespace std; int main() { for(int i=1; i<=10*3; i+=2) { for(int j=0; j<i; j++) { cout<<"#"; } cout<< endl; } return 0; } 自己2113定5261义4102变1653量内容
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯