Part 1
1

Boucles exercices : Exercice PHP n°2

The goal of the exercise is to apply what you have learned using the examples.

Statement

Ecrivez une boucle qui affiche ce qui est demandé :

Le nombre de colonne à afficher dépend du n° de ligne, à la ligne i, il faut afficher i colonnes.

 

Enter your response
$lignes = 8; for(/* trou/ */ /* /trou */) { for(/* trou/ */ /* /trou */) { print(/* trou/ */ /* /trou */); } print('<br>'); }
Result to obtain

1
22
333
4444
55555
666666
7777777
<br>1<br>22<br>333<br>4444<br>55555<br>666666<br>7777777<br>

Execution in 0.0004s