In mathematics, the Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers in the following integer sequence:
Loading
In mathematics, the Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers in the following integer sequence:

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Jan 18, 2013, 7:19 AM
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 elbazPosted Jan 18, 2013, 12:07 PM