Skip to content · ⁨コンテンツへスキップ⁩

Star triangle · ⁨星の三角形⁩

English

Star triangle

Print a triangle of stars four rows high: one star, then two, then three, then four.

Multiplying a string repeats it: "ab" * 3 is "ababab". Let the loop variable say how many stars each row needs.

日本語

スター三角形

4行分の星印の三角形を出力します: 1個、次に2個、3個、最後に4個。

文字列を掛けると重複します: "ab" * 3 は "ababab" です。ループ変数を使って各行に必要な星印の数を指定してください。

Log in or create account · ⁨ログインまたはアカウント作成⁩

IGCSE, A-Level & AP