Pascal algorithme

Fermé
faroukfaf96 Messages postés 1 Date d'inscription lundi 28 mars 2016 Statut Membre Dernière intervention 28 mars 2016 - Modifié par faroukfaf96 le 28/03/2016 à 14:48
ako2113 Messages postés 1 Date d'inscription lundi 28 mars 2016 Statut Membre Dernière intervention 29 mars 2016 - 29 mars 2016 à 13:55
Bonjour,
Comment je peux créer un algorithme qui affiche un triangle équilatéral des étoiles



A voir également:

1 réponse

ako2113 Messages postés 1 Date d'inscription lundi 28 mars 2016 Statut Membre Dernière intervention 29 mars 2016
29 mars 2016 à 13:55
program triangle;
var x,y,i,k,n,m : integer;
begin
m:=1;
n:=x-2;
writeln;
while x<>k do
begin
for i:=1 to n do
write(' ');
for j:=1 to m do
write('*');
m:=m+2;
n:=n-1;
writeln;
end;
end.
0