Advertisement
Teodor92

CartesianCoordinateSystem

Nov 28th, 2012
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 KB | None | 0 0
  1. using System;
  2.  
  3. class CartesianCoordinateSystem
  4. {
  5.     static void Main()
  6.     {
  7.         decimal x = decimal.Parse(Console.ReadLine());
  8.         decimal y = decimal.Parse(Console.ReadLine());
  9.         if (x == 0 && y == 0)
  10.         {
  11.             Console.WriteLine(0);
  12.         }
  13.         if (x > 0 && y > 0)
  14.         {
  15.             Console.WriteLine(1);
  16.         }
  17.         if (x < 0 && y > 0)
  18.         {
  19.             Console.WriteLine(2);
  20.         }
  21.         if (x < 0 && y < 0)
  22.         {
  23.             Console.WriteLine(3);
  24.         }
  25.         if ( x > 0 && y < 0)
  26.         {
  27.             Console.WriteLine(4);
  28.         }
  29.         if (x == 0 && y != 0 )
  30.         {
  31.             Console.WriteLine(5);
  32.         }
  33.         if (x != 0 && y == 0)
  34.         {
  35.             Console.WriteLine(6);
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement