Animate star - falling, rise up the sky

Delphi & Pascal (česká wiki)
Přejít na: navigace, hledání
Category: Homework in Pascal

Author: Juraj Pupák
Program: Animacia.pas
File exe: Animacia.exe
File ubuntu: Animacia

Animate star - falling, rise up the sky.
{ ANIMACIA.PAS                                                      }
{ Animacia padajucej a stupajucej hviezdicky.                       }
{                                                                   }
{ Author: Juraj Pupak                                               }
{ Date  : 27.10.2006                           http://www.trsek.com }
 
program animacia;
uses crt;
var
i,k,a : integer;
 
begin
 clrscr;
 k := 50;
 For i := 1 to 100 do
    begin
    a := i;
    a := a mod 15 + 1;
       IF i > 50  THEN
            begin
                 k := k - 1;
                 gotoxy(50,k);
                 textcolor(a);
                 write('*');
                 delay(250);
                 gotoxy(50,k);
                 textcolor(0);
                 write('*');
 
            end else
                begin
                     gotoxy(50,i);
                     textcolor(a);
                     write('*');
                     delay(250);
                     gotoxy(50,i);
                     textcolor(0);
                     write('*');
                end;
    end;
 readln;
end.