// $Id: fibo.csharp,v 1.0 2002/02/14 10:49:00 dada Exp $ // http://dada.perl.it/shootout/ using System; class App { public static int fib(int n) { return (n < 2) ? 1 : fib(n-2) + fib(n-1); } public static int Main(String[] args) { int N; int f; N = System.Convert.ToInt32(args[0]); if(N < 1) N = 1; f = fib(N); Console.WriteLine(f.ToString()+"\n"); return(0); } }