Advertisement
funbun

Print Long Sequence 2

Oct 28th, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.19 KB | None | 0 0
  1. using System;
  2.  
  3. class PrintLongSequence
  4. {
  5.     static void Main()
  6.     {
  7.         for (int i = 2, j = -3; i <= 1001 && j >= (-i) - 1; i += 2, j -= 2)
  8.         {
  9.             Console.Write("{0}, {1}, ", i, j);
  10.         }
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement