ellapt

CartesianCoordinateSystem

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