Advertisement
Vladimir76

задача 12

Jan 6th, 2014
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace InputExitZad12
  7. {
  8.     class InputZad11
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             decimal a = 0;
  13.             decimal a1 = 1;
  14.             decimal a2 = a + a1;
  15.             Console.WriteLine("{0,-5} | {1,30}",a1,a2);
  16.             for (int i = 2; i <= 100; i++)
  17.             {
  18.                 a = a1;
  19.                 a1 = a2;
  20.                 a2 = a + a1;
  21.                 Console.WriteLine("{0,-5} | {1,30}",i,a2);
  22.             }
  23.            
  24.  
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement