#include <iostream>
using namespace std;
int compute_binare_code(int n, int a[][4]){
    int i,j;
    int bC = 0, p = 1;
    for(i = 1;i <= n;i++){
        for(j = i+1;j <= n;j++){ //just counting bC
            bC += a[i][j]*p;
            p =p*2;
           } 
     }
    return bC;
}
int main(){
  cout << "mata3";
  int a[4][4],b[5][5],i,j;
  for(i=1;i<=4;i++)
    for(j=1;j<=4;j++)
        if( (i+j)%2 == 0)
            a[i][j]=0;
        else
            a[i][j]=1;
  cout<<"mata1";
  cout<<compute_binare_code(4, a);
  cout<<"mata2";
  return 0;
}
When i run this program, it doesn't give any error but it runs in background forever. It does not print anything, not even "mata3". Can someone explain me why?
 
    