Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
- int a = Integer.parseInt(reader.readLine());
- int b = Integer.parseInt(reader.readLine());
- System.out.println(Coordinate(a,b));
- }
- public static int Coordinate(int a, int b) {
- int x = 0;
- if (a > 0 && b > 0) x = 1 ;
- if (a < 0 && b > 0) x = 2 ;
- if (a < 0 && b < 0) x = 3 ;
- if (a > 0 && b < 0) x = 4 ;
- return x;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement