mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-22 20:55:01 +01:00
44 lines
920 B
ObjectPascal
44 lines
920 B
ObjectPascal
const
|
|
s: array[1..21] of string =
|
|
('10.00000000000000000',
|
|
'1.00000000000000000',
|
|
'0.10000000000000000',
|
|
'0.01000000000000000',
|
|
'0.00100000000000000',
|
|
'0.00010000000000000',
|
|
'0.00001000000000000',
|
|
'0.00000100000000000',
|
|
'0.00000010000000000',
|
|
'0.00000001000000000',
|
|
'0.00000000100000000',
|
|
'0.00000000010000000',
|
|
'0.00000000001000000',
|
|
'0.00000000000100000',
|
|
'0.00000000000010000',
|
|
'0.00000000000001000',
|
|
'0.00000000000000100',
|
|
'0.00000000000000010',
|
|
'0.00000000000000001',
|
|
'0.00000000000000000',
|
|
'0.00000000000000000');
|
|
|
|
var
|
|
e: extended;
|
|
c: longint;
|
|
s2: string;
|
|
|
|
begin
|
|
e := 10.0;
|
|
for c := 1 to 21 do
|
|
begin
|
|
str(e:0:17,s2);
|
|
writeln(s2);
|
|
if s2 <> s[c] then
|
|
begin
|
|
writeln(' Error, should be ',s[c]);
|
|
halt(1);
|
|
end;
|
|
e := e / 10.0;
|
|
end;
|
|
end.
|