Program GambarX;
Uses Crt;
Procedure xgambar (N : Integer);
var Tinggi,x,y : Integer;
Begin
X := N;
For Tinggi := 1 To N do
Begin
Write (' ');
For Y := 1 To N do
Begin
If (Tinggi = Y) Or (Y = X) Then
Write (Y) {bisa diganti dengan huruf/angka/symbol lain}
Else Write (' ');
End;
Dec(X);
Writeln;
End;
End;
Var
X : Integer;
Ulang : Char;
Begin
Repeat
Clrscr;
Write ('Masukkan Tinggi X : ');
Readln (X);
Writeln ;
Xgambar (X);
Writeln;
Write ('Mulai Ulang (y/n) ? ');
Readln (Ulang);
Until Ulang <> 'y';
End.
***** SEMOGA BERMANFAAT *****
Tidak ada komentar:
Posting Komentar