Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
505 kaklik 1
program ahoj;
2
 
3
uses crt;
4
var
5
   x,fact: double;
6
 
7
 
8
begin
9
     clrscr;
10
 
11
     write ('Yadejte cele cislo: ');
12
     readln(x);
13
     fact:=1;
14
 
15
     if(x>=0) then
16
     begin
17
 
18
         while ((x>1)) do
19
         begin
20
             fact := fact * x;
21
             x := x - 1;
22
         end;
23
         writeln ('faktorial cisla je:', fact:10:0);
24
 
25
     end
26
     else
27
     begin
28
         writeln('Faktorial zaporneo cisla neni definovan');
29
 
30
     end;
31
 
32
     readkey;
33
end.