Advertisement
enevlogiev

LongSequence

Jan 19th, 2015
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using System;
  2.  
  3. class PrintLongSequence
  4. {
  5.     static void Main()
  6.     {
  7.         Console.BufferHeight = 1001;
  8.         for (int i = 2; i <= 1001; i++)
  9.         {
  10.             if (i % 2 == 0)
  11.             {
  12.                 Console.WriteLine(i);
  13.             }
  14.             else
  15.             {
  16.                 Console.WriteLine(-i);
  17.             }
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement