/* t4_1.c ( PASCAL講座 sample program ) 配列のサンプル:魔方陣 コンパイル命令は gcc t4_1.c -o t4_1 実行命令は t4_1 */ #include #include #define size 5 /* 配列のサイズを取り替えて使いたいときは define してここだけ書き換えるのが便利 */ main() { int x[size][size]; int y[size][size]; int i,j,p; printf("魔方陣を作成します。\n"); printf("\n"); p=size; for(i=0;i