33,311
社区成员
发帖
与我相关
我的任务
分享
#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main()
{
int A[7][7] =
{
{0,0,0,0,0,0,0},
{0,0,0,1,0,0,0},
{0,0,1,0,1,0,0},
{0,1,1,1,1,1,0},
{1,0,0,0,0,0,1},
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0}
};
for(int row=0;row<7;row++)
{
for(int col=6;col>=0;col--)
{
if(A[col][row]==0)
cout<<' ';
else
cout<<'*';
}
cout<<endl;
}
return 0;
}