Advertisement
FLISEN

PrintSequence

Dec 29th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.26 KB | None | 0 0
  1. using System;
  2.  
  3. class PrintSequence
  4. {
  5. public static void Main()
  6.     {
  7.     for (int i = 2; i <= 11; i++)
  8.     {
  9.         if (i % 2 == 0)
  10.         {
  11.             Console.WriteLine(" {0}", i);
  12.         }
  13.         else Console.WriteLine("-{0}", i);
  14.     }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement