#include <stdio.h>

int main(void) {
	int array[9] = {
 		1, 2, 3,
 		4, 5, 6,
 		7, 8, 9
	}, x, y, *pointer[3];

	puts("[y * 3 + x]");
	for(y=0;y<3;y++) {
  		for(x=0;x<3;x++) {
    		printf("%2d ", array[y * 3 + x]);
  		}
  		puts("");
	}

	puts("[y][x]");
	for(y=0;y<3;y++) {
//		pointer[y] = (int**)&(array[y * 3]);
		pointer[y] = &(array[y * 3]);
  		for(x=0;x<3;x++) {
//  			pointer[y][x] = (int*)((y * 3 + x + 1) * 10);
  			pointer[y][x] = (y * 3 + x + 1) * 10;
    		printf("%2d ", array[y * 3 + x]);
  		}
  		puts("");
	}

	return 0;
}
