close
import java.io.*;
public class test05{
public static void main(String[] args)throws IOException
{
BufferedReader input = new BufferedReader
(new InputStreamReader(System.in));
String s1,s2,s3;
int a,b,c,max;
System.out.print("請輸入第一個數字 : ");
s1=input.readLine();
System.out.print("請輸入第二個數字 : ");
s2=input.readLine();
System.out.print("請輸入第三個數字 : ");
s3=input.readLine();
a=Integer.parseInt(s1);
b=Integer.parseInt(s2);
c=Integer.parseInt(s3);
if(a>b)
{
if(a>c)
max=a;
else
max=c;
}
else
{
if(b>c)
max=b;
else
max=c;
}
System.out.println("最大的數字為 " +max );
}
}
全站熱搜