Advertisement
Guest User

01. Simple Calculation

a guest
Mar 20th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4. static void Main()
  5. {
  6. decimal x = decimal.Parse(Console.ReadLine());
  7. decimal y = decimal.Parse(Console.ReadLine());
  8.  
  9.  
  10. if (x > 0 && y > 0) { Console.WriteLine(1); }
  11. else if (x < 0 && y < 0) { Console.WriteLine(3); }
  12. else if (x < 0 && y > 0) { Console.WriteLine(2); }
  13. else if (x > 0 && y < 0) { Console.WriteLine(4); }
  14. else if (x == 0 && y == 0) { Console.WriteLine(0); }
  15. else if (x == 0) { Console.WriteLine(5); }
  16. else if (y == 0) { Console.WriteLine(6); }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement