Skip to content · ⁨Passer au contenu⁩

Star triangle · ⁨Triangle d'étoiles⁩

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.

Français

Triangle d'étoiles

Affichez un triangle d'étoiles haut de quatre lignes : une étoile, puis deux, puis trois, puis quatre.

Multiplier une chaîne la répète : "ab" * 3 est "ababab". Laissez la variable de boucle dire combien d'étoiles chaque rangée nécessite.

Log in or create account · ⁨Se connecter ou créer un compte⁩

IGCSE, A-Level & AP