怎样将这个图案横着排呢?求教
这是一个图案,要求横着排一下,可我只会竖着,谁能帮我排一下?以下是图案
![](images/attachicons/zip.gif)
下面是程序代码
![](zzz/editor/img/code.gif)
#include <iostream> using namespace std; int main() { int i,j,m,n; //第一个 for(i=1;i<=10;i++) { for(j=1;j<=i;j++) { cout<<"*"; } cout<<endl; } cout<<endl; //第二个 for(m=1;m<=10;m++) { for(n=1;n<=(11-m);n++) { cout<<"*"; } cout<<endl; } cout<<endl; //第三个 for(m=1;m<=10;m++) { for(n=1;n<=(11-m);n++) { cout<<"*"; } cout<<endl; } cout<<endl; //第四个 for(i=1;i<=10;i++) { for(j=1;j<=i;j++) { cout<<"*"; } cout<<endl; } return 0; }