問題タブ [interpretation]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c - 魔方陣コード ヘルプ、数値を下に移動する場所を知りたい C でのプログラミング
コードがどこに数字を置いているか誰か教えてもらえないかと思っていました。3x3 の魔方陣が必要だとします。出力は次のようになります。
https://i.stack.imgur.com/BYTSn.png
1 が既にあるので、コードのどこで 4 を下に移動するのだろうと思っていました。7が下に移動しても同じです。原則として、毎回上に 1 つ、右に 1 つ移動し、そこに何かがある場合は下に移動して続行します。