- import java.util.Scanner;
- public class Main
- {
- public static void main (String[]args)
- {
- Scanner s = new Scanner (System.in);
- double a, b;
- a = sc.nextInt ();
- try
- {
- b = sc.nextInt ();
- try
- {
- if(a==0&&b==0)
- {
- System.out.print ("("+a","+b")orginal");
- }
- if(a==0&&b!=0)
- {
- System.out.print ("("+a","+b")Y");
- } if(a!=0&&b==0)
- {
- System.out.print ("("+a","+b")X");
- } if(a>0&&b>0)
- {
- System.out.print ("("+a","+b")1");
- } if(a<0&&b>0)
- {
- System.out.print ("("+a","+b")2");
- } if(a<0&&b<0)
- {
- System.out.print ("("+a","+b")3");
- }if(a>0&&b<0)
- {
- System.out.print ("("+a","+b")4");
- }
- }
- catch (Exception e)
- {
- System.out.print ("error");
- return;
- }
- }
- catch (Exception e)
- {
- System.out.print ("error");
- return;
- }
- b = sc.nextInt ();
- }
複製代碼 |