#include <stdlib.h>

int **multiplication_table(int n) {

  int **feeback=calloc(n,sizeof(int*)), *tmp=calloc(n*n,sizeof(int));

  int count[2];
  
  for(count[0]=0;count[0]<n;count[0]++){
    feeback[count[0]]=tmp;
    for(count[1]=0;count[1]<n;count[1]++){
      *tmp=(count[0]+1)*(count[1]+1);
      tmp+=1;
    }
  }

  return feeback;

}