Something
public text v1 · immutable#include <iostream>
#include <iomanip>
#include <stdio.h>
using namespace std;
#define M 4
#define N 4
int main()
{
int A[M][N];
for (int i = 0; i < M; ++i)
{
for (int j = 0; j < N; ++j)
{
if(i == j)
A[i][j]=0;
else
{
if(i<j)
A[i][j]=1;
else A[i][j]=-1;
}
}
}
for(int i=0;i<M; ++i)
{
for(int j=0;j<N;++j)
cout<<setw(3)<<A[i][j];
cout<<endl;
}
return 0;
}