blob: 79024675b753fd1d6782e2cf0e5a635636a90a61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{$mode objfpc}
type
TForm1 = class
function crash(n:integer):real;
end;
function TForm1.crash(n:integer):real;
begin
case n of
0: Result:=0;
1..100: Result:=crash(n-1)+crash(n-1);
end;
end;
var
f : TForm1;
begin
f:=TForm1.create;
writeln(f.crash(15));
f.Free;
end.
|