12.5.6. Napisati program za ispis kao na slici (do 20 redova)::
Opis rješenja:
Listing programa:
PROGRAM p12500038;
USES
WinCRT;
CONST
centar = 40;
VAR
redmax : 5..20;
red, kol, zv: INTEGER;
BEGIN
WRITE('Broj redova ');
READLN( redmax );
FOR red := 1 TO redmax DO
BEGIN
FOR kol := 1 TO centar - red DO
WRITE(' ');
FOR zv := 1 TO 2 * red - 1 DO
WRITE('*');
WRITELN;
END;
END.
Ispis na ekranu:
Index
|