Advertisement
funbun

Print Long Sequence 1

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