#include
using namespace std;
int main()
{
int n;
cout << "n = ",cin >> n;
int A[n+1][n+1];
cout <<"1: \n";<br> for(int i = 1; i <=n; i++)<br> {
if(i % 2 == 0)
for(int j = n; j>0; j--)
{
A[i][j] = j;
cout << A[i][j]<<" ";<br> }
else
for(int j = 1; j<=n; j++)<br> {
A[i][j] = j;
cout << A[i][j]<<" ";<br> }
cout <<"\n";<br> }
cout <<"\n7: \n";<br> for( int i = 1; i<=n/2; i++, cout <<"\n")<br> for( int j = 1; j<=n; j++)<br> cout <<(A[i][j] = (j>=i&&j<=n-i+1))<<" ";<br>
for( int i = n/2+1; i<=n; i++, cout <<"\n")<br> for( int j = 1; j<=n; j++)<br> cout <<(A[i][j] = (j>=n-i+1&&j<=i))<<" ";<br>
system("Pause");
return 0;
}