Another fun question is when during a technical interview, they ask you to write a recursive program to display Fibonacci numbers.
The definition (from wikipedia, link above):
“By definition, the first two Fibonacci numbers are 0 and 1, and each subsequent number is the sum of the previous two. Some sources omit the initial 0, instead beginning the sequence with two 1s.”
The definition might give you a clue on how to solve this recursively since every result is the sum of the previous 2 result. What I’ve done is to create a method to calculate this that takes the number of times the recursion has to occur as a parameter:
1: int Fibonacci(int x)
2: {
3: if (x <= 1)
4: return 1;
5: return Fibonacci(x - 1) + Fibonacci(x - 2);
6: }
Of course, this means that you will have to call this method from a loop-statement where you can say how many recursions you want:
1: public static void Main()
2: {
3: for (int i = 0; i < 10; i++)
4: {
5: Console.WriteLine(Fibonacci(i));
6: }
7:
8: Console.ReadKey();
9: }
So this main-method will call the Fibonacci method 10 times, which gives the following output:

c4ed19eb-cf85-43b4-8da8-0e9b9a2f46a9|0|.0