archangelmihail

CartesianSystem

Nov 30th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.25 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. using System.Numerics;
  7.  
  8. namespace CartesianSystem
  9. {
  10.     class CartesianSystem
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.            
  15.                 decimal x = decimal.Parse(Console.ReadLine());
  16.                 decimal y = decimal.Parse(Console.ReadLine());
  17.  
  18.                 if (x > 0 && y > 0)
  19.                 {
  20.                     Console.WriteLine(1);
  21.                 }
  22.                 else if (x > 0 && y < 0)
  23.                 {
  24.                     Console.WriteLine(4);
  25.                 }
  26.                 else if (x < 0 && y < 0)
  27.                 {
  28.                     Console.WriteLine(3);
  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(0);
  37.                 }
  38.                 else if (x == 0)
  39.                 {
  40.                     Console.WriteLine(5);
  41.                 }
  42.                 else if (y == 0)
  43.                 {
  44.                     Console.WriteLine(6);
  45.                 }
  46.            
  47.         }
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment