16 lines
No EOL
248 B
C#
16 lines
No EOL
248 B
C#
using System;
|
|
class HelloWorld {
|
|
|
|
static long fib(long n) {
|
|
if (n<=1) {
|
|
return n;
|
|
} else {
|
|
return fib(n-1) + fib(n-2);
|
|
}
|
|
}
|
|
|
|
static void Main(string[] args) {
|
|
Console.WriteLine(fib(Int64.Parse(args[0])));
|
|
}
|
|
|
|
} |