Program HelloWorld output var integer function real real var integer b

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Program HelloWorld(output);
var b: integer;
function h(s: real): real;
var i: integer;
begin
i := 0;
h := 1;
while i < 10 do begin
if frac(s) > 0 then begin
s := s * 10;
i := i + 1;
h *= 0.1;
end else break;
end;
end;
{function ex(a: integer): integer;
var b: integer;
begin
read(b);
ex := a + b;
end;}
begin
writeln(h(5.034):0:5);
writeln(num_of_frac(3.3333):2);
{write(ex(2));}
end.