open Printf
exception Input_Negativo;;

let rec fib x = 
   if (x<0) 
   then raise Input_Negativo 
   else if (x <= 1)
        then 1 
        else fib (x-1) + fib (x-2) 

let () = printf "%d\n" (fib (int_of_string Sys.argv.(1)))


This document was generated using caml2html