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