#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
n = 100;
for(int i = 0; i < n; ++i){
for(int j = 0; j < n; ++j){
if(!(i&1) and !j and i != n-1) cout << 1;
else if((i&1) and j == n-1) cout << 1;
else if(i == n-1 and j) cout << 1;
else cout << 0;
}
cout << endl;
}
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #include <bits/stdc++.h> using namespace std; int main(){ int n; n = 100; for(int i = 0; i < n; ++i){ for(int j = 0; j < n; ++j){ if(!(i&1) and !j and i != n-1) cout << 1; else if((i&1) and j == n-1) cout << 1; else if(i == n-1 and j) cout << 1; else cout << 0; } cout << endl; } } |
English