Senin, Februari 14, 2022

Program Pascal Membuat Kotak

Hasilnya nanti seperti pada video berdurasi 20 detik di bawah ini:


program A_Top1;

uses
SysUtils,
crt;

var
L,T,R,B : Integer;
i,d : Integer;

label a_Top, a_Right, a_left, a_bottom;

begin
L := 5; T:= 3; R:=40; B := 20; ; D:=50;

i := L;

a_Top:
GotoXY(i,T);

write('*');
Delay(d);
i := i + 1;
if i < R then
goto a_Top;
/////////////////////////////////////////////

i := T;
a_Right:
GotoXY(R,i);

write('*');
Delay(d);
i := i + 1;
if i < B then
goto a_Right;
/////////////////////////////////////////////

i := R;
a_left:
GotoXY(i,B);

write('*');
Delay(d);
i := i - 1;
if i > L then
goto a_left;
/////////////////////////////////////////////

i := B;
a_bottom:
GotoXY(L,i);

write('*');
Delay(d);
i := i - 1;
if i > T then
goto a_bottom;

Readkey;
end.


Mohon koreksinya, program pascal lainnya dapat dilihat di daftar isi, terimakasih

1 komentar:

Borgata Hotel Casino & Spa - Mapyro
Borgata 영주 출장마사지 Hotel Casino 아산 출장샵 & Spa is an upscale 태백 출장마사지 hotel with multiple restaurants, a casino, and a seasonal outdoor 서울특별 출장샵 pool. 하남 출장샵 Rating: 7.5/10 · ‎10 reviews · ‎Price range: Call