PROGRAM ANIMASI
LISTING PROGRAM
Program1 :
program la_ap;
uses crt;
var
kalimat:string;
posx, posy:integer;
pergi:boolean;
begin
clrscr;
write('kalimat:'); readln(kalimat);
clrscr;
posx:=0; posy:=13; pergi:= true;
repeat
if pergi then
begin
inc(posx);
gotoxy(posx,posy); write(kalimat);
gotoxy(posx-1,posy); clreol;
if(posx=80-length(kalimat)) then pergi:= false; delay(10000);
end
else
begin
clrscr;
dec(posx);
gotoxy(posx,posy); write(kalimat); delay(10000);
gotoxy(posx+1, posy); clreol;
if posx=1 then pergi:= true;
end
until keypressed;
end.
LISTING PROGRAM
Program2:
program la_ap;
uses crt;
var
kalimat:string;
posx, posy:integer;
pergi:boolean;
begin
clrscr;
write('kalimat : '); readln(kalimat);
clrscr;
posx:=13; posy:=0; pergi:= true;
repeat
if pergi then
begin
inc(posy);
gotoxy(posx,posy); write(kalimat);
gotoxy(posx,posy-1); clreol;
if(posy=35-length(kalimat)) then pergi:= false; delay(10000);
end
else
begin
clrscr;
dec(posy);
gotoxy(posx,posy); write(kalimat); delay(10000);
gotoxy(posx, posy+1); clreol;
if posy=1 then pergi:= true;
end
until keypressed;
end.
_Selamat Belajar_
RL.power
Tidak ada komentar:
Posting Komentar