import java.io.*;
public class MyMath
{
   //static int a,b,c;
   public static void Max(int a,int b,int c)
{
    if(a>b)
      {
        if(a>c)  System.out.println("the bigest number  is "+a);
else  System.out.println("the bigest number is "+c);
       } 
else
{
if(b>c)  System.out.println("the bigest number is "+b);
else  System.out.println("the bigest number is "+c);
}
}
public static void main(String[]  args)throws  IOException
{
   MyMath  m=new MyMath();
 int n1;
int n2;
int n3;
System.out.println("please enter the first number:");
 n1=(int)System.in.read();
 System.out.println("please enter the second number:");
 n2=(int)System.in.read();
  System.out.println("please enter the third number:"); 
 n3=(int)System.in.read(); 
m.Max(n1,n2,n3);
}
}
就是这个,就是要求输入三个数,然后输出最大数
 
运行时只输入一个数就结束程序了,不知道问题出在哪
 
 

 
											





 
	     
											
