返回列表 發帖
  1. import java.util.Scanner;

  2. public class Main
  3. {
  4.   public static void main (String[]args)
  5.   {
  6.     Scanner s = new Scanner (System.in);
  7.     double a, b;
  8.       a = sc.nextInt ();
  9.       try
  10.     {
  11.         b = sc.nextInt ();
  12.       try
  13.       {
  14.           if(a==0&&b==0)
  15.           {
  16.             System.out.print ("("+a","+b")orginal");  
  17.           }
  18.            if(a==0&&b!=0)
  19.           {
  20.             System.out.print ("("+a","+b")Y");  
  21.           }          if(a!=0&&b==0)
  22.           {
  23.             System.out.print ("("+a","+b")X");  
  24.           }          if(a>0&&b>0)
  25.           {
  26.             System.out.print ("("+a","+b")1");  
  27.           }          if(a<0&&b>0)
  28.           {
  29.             System.out.print ("("+a","+b")2");  
  30.           }          if(a<0&&b<0)
  31.           {
  32.             System.out.print ("("+a","+b")3");  
  33.           }if(a>0&&b<0)
  34.           {
  35.             System.out.print ("("+a","+b")4");  
  36.           }
  37.       }
  38.       catch (Exception e)
  39.       {
  40.         System.out.print ("error");
  41.         return;
  42.       }
  43.     }
  44.     catch (Exception e)
  45.     {
  46.       System.out.print ("error");
  47.       return;
  48.     }
  49.     b = sc.nextInt ();
  50.   }
複製代碼

TOP

返回列表