calculating fibonacci series in c#

Posted by Raj_Chennai under C# category on | Points: 40 | Views : 19239
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace fib

class Program
static void Main(string[] args)
int num1;
int num2;
num1 = num2 = 1;
Console.WriteLine("{0}", num1);
while (num2 < 200)
num2 += num1;
num1 = num2 - num1;

Comments or Responses

Posted by: Shubham on: 3/10/2012 Level:Starter | Status: [Member] | Points: 10
sorry raj...
plzzzz say that what is the use of linq namespace in this code.....
thank uuuu
Posted by: Raj_Chennai on: 3/12/2012 Level:Starter | Status: [Member] | Points: 10
just remove the namespace "Using system.LINQ" then all code will work.The code which i shared is in visualstudio2010 so by default it provide this namespace.There is no requirement for usage of this namspace

Login to post response