![]() |
#2
dz7899892012-08-22 00:42
|
以下是图案
只有本站会员才能查看附件,请 登录
下面是程序代码

#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;
}
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;
}