Baik, langsung saja kalian ketik atau copy kode dibawah ini diprogram pascal:
uses crt;
var
teks : string;
x,y,i,panjang: byte;
turun, kanan : boolean;
begin
clrscr;
teks:= 'INFORMATIKA';
y:=1; x := 1;
REPEAT
textcolor(x);
if y=1 then turun := true;
if y=39 then turun := false;
if turun then inc(y) else dec(y);
if x=1 then kanan :=true;
if x=(79 - length(teks)) then kanan :=false;
if kanan then inc(x) else dec(x);
gotoxy(x,y); write(teks); delay(100);
UNTIL keypressed;
end.
Setelah selesai mengetik atau mengcopy kode diatas, lalu di RUN dan lihat hasilnya....
sekian, semoga bermanfaat
0 komentar:
Posting Komentar