Advertisement
G_Burlakova

CartesianCoordinateSystem

Mar 31st, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.90 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. class CartesianCoordinateSystem
  8. {
  9.     static void Main(string[] args)
  10.     {
  11.         decimal X = decimal.Parse(Console.ReadLine());
  12.         decimal Y = decimal.Parse(Console.ReadLine());
  13.  
  14.         if (X == 0 && Y == 0)
  15.         {
  16.             Console.WriteLine(0);
  17.         }
  18.         else if (X == 0)
  19.         {
  20.             Console.WriteLine(5);
  21.         }
  22.         else if (Y == 0)
  23.         {
  24.             Console.WriteLine(6);
  25.         }
  26.         else if (X > 0 && Y > 0)
  27.         {
  28.             Console.WriteLine(1);
  29.         }
  30.         else if (X < 0 && Y > 0)
  31.         {
  32.             Console.WriteLine(2);
  33.         }
  34.         else if (X < 0 && Y < 0)
  35.         {
  36.             Console.WriteLine(3);
  37.         }
  38.         else
  39.         {
  40.             Console.WriteLine(4);
  41.         }
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement