Category : Miscellaneous Language Source Code
Archive   : ADATUT12.ZIP
Filename : FIB.ANS

 
Output of file : FIB.ANS contained in archive : ADATUT12.ZIP

-- Our solution to Outside Assignment 4 (in FIB.ANS):
separate (FIBTEST)
function FIB(N : in POSITIVE) return POSITIVE is
ANSWER : POSITIVE := 1;
begin
if N > 2 then
ANSWER := FIB(N - 1) + FIB(N - 2);
end if;
return ANSWER;
end FIB;