0
0

【n * n の 2 次元配列の表示】N * N の九九表の出力

Last updated at Posted at 2023-11-14

今度は出力されるnまでの九九表を作れという問題。
https://paiza.jp/works/mondai/stdout_primer/stdout_primer__2dim_array_boss
九九の問題があったのでわかりやすかった
一応、自然数が出されるけど、Nコの場合+1しないといけないが、
N番目のところをN+1としないように注意

N = int(input())
for i in range(1,N+1):
    for j in range(1,N+1):
        if j == N:
            print(j * i)
        else:
            print(j * i,end= " ")

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0