summaryrefslogtreecommitdiff
path: root/fpcdocs/refex/ex54.pp
blob: d9fa416c77f9310815930066c0a706510f1d02c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
Program Example54;

{ Program to demonstrate the Round function. }

begin
  Writeln (Round(1234.56));  { Prints 1235     }
  Writeln (Round(-1234.56)); { Prints -1235    }
  Writeln (Round(12.3456));  { Prints 12       }
  Writeln (Round(-12.3456)); { Prints -12      }
  Writeln (Round(2.5));      { Prints 2 (down) }
  Writeln (Round(3.5));      { Prints 4 (up)   }
    
end.