Skip to content · ⁨Pular para o conteúdo⁩

Star triangle · ⁨Triângulo de estrelas⁩

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.

Português

Triângulo de estrelas

Imprima um triângulo de estrelas com quatro linhas: uma estrela, depois duas, depois três, depois quatro.

Multiplicar uma string a repete: "ab" * 3 é "ababab". Deixe a variável do loop dizer quantas estrelas cada linha precisa.

Log in or create account · ⁨Entrar ou criar conta⁩

IGCSE, A-Level & AP