Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- int N,a=-1,b=1,c;
- Console.WriteLine("Enter the Number of Series to print");
- N = Convert.ToInt16(Console.ReadLine());
- for(int i=1; i<= N; i++)
- {
- c = a + b;
- Console.Write(" " + c);
- a = b;
- b = c;
- }
- Console.ReadLine();
- }
- }
Add Comment
Please, Sign In to add comment