In mathematics, the Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers in the following integer sequence:
Can you help me to print a Fibonacci Series ...
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 18, 2013, 2:19 AM EST
try following code in console application
int n, first = 0, second = 1, next, c;
Console.WriteLine("Enter the number of terms\n");
n = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("First " + n.ToString() + " terms of Fibonacci series are :-\n");
for (c = 0; c < n; c++)
{
if (c <= 1)
next = c;
else
{
next = first + second;
first = second;
second = next;
}
Console.WriteLine(next);
}
Console.ReadLine();
hope this will help you.
islam elbaz20 reputationPosted Jan 18, 2013, 7:07 AM EST