Advertisement
Shtiler

Fibonacci

Sep 18th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace homework_3
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int a = 1;
  14. int b = 1;
  15. Console.WriteLine("f1 = {0}", a);
  16. Console.WriteLine("f2 = {0}", b);
  17. a = a + b;
  18. Console.WriteLine("f3 = {0}", a);
  19. b = b + a;
  20. Console.WriteLine("f4 = {0}", b);
  21. a = a + b;
  22. Console.WriteLine("f5 = {0}", a);
  23. b = b + a;
  24. Console.WriteLine("f6 = {0}", b);
  25. Console.ReadLine();
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement