Subversion Repositories svnkaklik

Rev

Blame | Last modification | View Log | Download

program ahoj;

uses crt;
var
   x,fact: double;


begin
     clrscr;

     write ('Yadejte cele cislo: ');
     readln(x);
     fact:=1;

     if(x>=0) then
     begin

         while ((x>1)) do
         begin
             fact := fact * x;
             x := x - 1;
         end;
         writeln ('faktorial cisla je:', fact:10:0);

     end
     else
     begin
         writeln('Faktorial zaporneo cisla neni definovan');

     end;

     readkey;
end.