//赏分已经是原来的两倍了import java.io.*;class JavaThrows{
 
 public int compute(int x) throws ArithmeticException{
  
  int z=100/x;
  return z;}
  
  public void method1(){
   int x;
   
   while(true){
   try{
    x=System.in.read();
    x=x-48;
    x=compute(x);
    System.out.println(x);}
    
    
    catch(IOException ioe){
     System.out.println("read error");}
     catch(ArithmeticException e){
      System.out.println("devided by 0");}
   }
   
   }
   
   public static void main(String args[]){
    JavaThrows t1=new JavaThrows();
    t1.method1();}
 
 }运行看看输出
怎么老是更着两个-2
-2