The Fibonacci series is one in which the addition of two previous terms gives you the next term. That is. 0,1,2,3,5,8,13....1 + 2 is the next consecutive term which is 3, so is 3 + 5 (8)the next term.
This program uses a function subprogram to call by value.
I : integer;
Function fibonacci (a: integer): integer;
If a=1 then
Else if n=2 then
Fibonacci := Fibonacci(a-1) + Fibonacci (n-2);
For I:= 1 to 20 do