http://www.cse.msu.edu/~torng/Classes/Archives/cps360.98spring/Examples/CFGtoPDA/tsld001.htm
watch: alan turings documentary
http://www.cse.msu.edu/~torng/Classes/Archives/cps360.98spring/Examples/CFGtoPDA/tsld001.htm
int a = 0;
int b = 1;
int c = 0;
int n = 46; //to the N'th fibonacci No.
Console.WriteLine("Which Fibonacci Number do you want?");
n = Convert.ToInt16(Console.ReadLine());
if (n != 1)
{
for (int i = 1; i <= n; i++)
{
c = a + b;
a = b;
b = c;
}
Console.WriteLine("the {0}th Fibonacci number is {1}", n, a);
}
else
{
Console.WriteLine("the {0}st Fibonacci number is 1", n);
}
Console.ReadKey();