Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class CartesianCoordinateSystem
- {
- static void Main()
- {
- decimal x = decimal.Parse(Console.ReadLine());
- decimal y = decimal.Parse(Console.ReadLine());
- if (x == 0 && y == 0)
- {
- Console.WriteLine("0");
- }
- else if (x == 0 && y != 0)
- {
- Console.WriteLine("5");
- }
- else if (x != 0 && y == 0)
- {
- Console.WriteLine("6");
- }
- else if (x > 0 && y > 0)
- {
- Console.WriteLine("1");
- }
- else if (x > 0 && y < 0)
- {
- Console.WriteLine("4");
- }
- else if (x < 0 && y > 0)
- {
- Console.WriteLine("2");
- }
- else
- Console.WriteLine("3");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment