~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to docs/mathex/ex36.pp

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Program Example36;
2
 
 
3
 
{ Program to demonstrate the PopnVariance function. }
4
 
 
5
 
Uses math;
6
 
 
7
 
Type
8
 
  TExArray = Array[1..100] of Float;
9
 
 
10
 
Var
11
 
  I : Integer;
12
 
  ExArray : TExArray;
13
 
 
14
 
begin
15
 
  Randomize;
16
 
  for I:=1 to 100 do
17
 
    ExArray[i]:=(Random-Random)*100;
18
 
  Writeln('Max           : ',MaxValue(ExArray):8:4);
19
 
  Writeln('Min           : ',MinValue(ExArray):8:4);
20
 
  Writeln('Pop. var.     : ',PopnVariance(ExArray):8:4);
21
 
  Writeln('Pop. var. (b) : ',PopnVariance(@ExArray[1],100):8:4);
22
 
end.