Advertisement
G_Burlakova

PrintLongSequence

Mar 23rd, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 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. class PrintLongSequence
  8. {
  9.     static void Main(string[] args)
  10.     {
  11.         Console.BufferHeight = 1001;
  12.         for (int i = 2; i <= 1001; i++)
  13.         {
  14.             if (i % 2 == 0)
  15.             {
  16.                 Console.WriteLine(i);
  17.             }
  18.             else
  19.             {
  20.                 Console.WriteLine(-i);
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement