Advertisement
remote87

Numbers in range

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