home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 June
/
PCWorld_1998-06_cd.bin
/
software
/
Programy
/
Ozogan
/
ARRAY.IPS
< prev
next >
Wrap
Text File
|
1998-03-25
|
633b
|
22 lines
VAR
x : integer;
soucet : real
cislo : array[1..10] OF real;
ENDVAR
PROCEDURE main
ConsoleClear;
ConsoleShow;
FOR x := 1 to 10 {pro celΘ pole}
cislo[x] := Random(100); {nßhodnΘ Φφslo}
WRITELN(x:2, ':', cislo[x]:10:3); {v²pis hodnoty}
ENDFOR
soucet := 0; {nulovßnφ souΦtu}
FOR x := low(cislo) to high(cislo) {rozsah pomocφ indexu}
soucet := soucet + cislo[x];
ENDFOR
WRITELN('-------------');
WRITELN('SouΦet:',soucet:6:2);
WRITELN('Pr∙m∞r:',soucet/10:6:2); {v²poΦet pr∙m∞ru}
ENDPROC