home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
ozogan
/
LOKAL.IPS
< prev
next >
Wrap
Text File
|
1997-08-17
|
637b
|
27 lines
VAR
v : integer = 999;
ENDVAR
FUNCTION umocni(x : integer, y : integer): integer
VAR
k : integer;
v : real;
ENDVAR
v := x; {p°evezneme zßklad}
WRITELN("p°edßvanß hodnota x:",V:4);
WRITELN("lokßlnφ hodnota v:",V:4);
FOR k:= 1 to y
v := v*x; {nßsobφme opakovan∞ zßkladem}
ENDFOR
umocni := v; {p°edßme v²sledku funkce}
ENDPROC
PROCEDURE main
ConsoleClear;
WRITELN("globßlnnφ hodnota v:",V:4);
WRITELN(umocni(2,9):10); {vracφ hodnotu 1024}
WRITELN(umocni(3,3):10); {vracφ hodnotu 81}
WRITELN("globßlnnφ hodnota v:",V:4);
ENDPROC