Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.IO;
- using System;
- class Fibonacci
- {
- static void Main (string[]args)
- {
- int i = 1;
- int temp = 0;
- int temp1 = 0;
- for(int a = 0; a < 10 /*arbitrary number*/; a++)
- {
- Console.WriteLine(i);
- temp1 = temp;
- temp = i;
- i = temp + temp1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment