Advertisement
G_Burlakova

PrintSequence

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