Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class _01_CartesianCoordinateSystem {
- public static void main(String[] args) {
- Scanner input =new Scanner(System.in);
- int x = input.nextInt();
- int y = input.nextInt();
- if (x==0 ) {
- System.out.println(6);
- }
- if (y==0 ) {
- System.out.println(5);
- }
- if (x==0 && y==0 ) {
- System.out.println(0);
- }
- if (x>0 && y>0 ) {
- System.out.println(1);
- }
- if (x<0 && y>0 ) {
- System.out.println(2);
- }
- if (x<0 && y<0 ) {
- System.out.println(3);
- }
- if (x>0 && y<0) {
- System.out.println(4);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement