0分,求助!c++
查看原帖
0分,求助!c++
1120247
__asdfASDF12345楼主2023/12/3 17:32
#include<iostream>
using namespace std;
int main()
{
    int n,z=1,d=1,y;
    cin>>n;
    n=n*n;
    for(int i=1;i<=n;n=n-y)
    {
        cin>>y;
        z++;
        for(int j=1;j<=y;j++)
        {
            d++;
            if(z%2==0)
            {
                cout<<'0';
                if(d>7)
                {
                    d=1;
                    cout<<endl;
                }
            }
            if(z%2!=0)
            {
                cout<<'1';
                if(d>7)
                {
                    d=1;
                    cout<<endl;
                }
            }
        }
    }
    system("pause");
    return 0;
}

注:本人电脑有问题,必须加pause,不要说pause的事了

2023/12/3 17:32
加载中...