Ok after a couple of ours of googling and trial and error I have finally succeeded my first "difficult" exercise. Thanks @hamster_nz and Salem for your advices. I am posting here the final result.
insert
Code:
#include <stdio.h>#include <stdlib.h>
#include <math.h>
int main()
{
int x, i, j;
do {
printf("Insert Value for x: \n");
scanf("%d", &x);
} while (x<=1 || x>=21);
int array[21][21];
for (i=0; i<x; i++){
for (j=0; j<3; j++){
array[i][j] = pow (i+1, j+1);
}
}
printf("Two Dimensional array elements:\n");
for(i=0; i<x; i++){
for(j=0; j<3; j++){
printf("%d ", array[i][j]);
}
printf("\n");
}
return 0;
}