package di5tain.zao;
import java.util.Scanner;
public class Shuzu {
public static void main(String[] args) {
Scanner er= new Scanner(System. in);
int[] rt =new int[3];
for (int i = 0; i < 3; i++) {
System.out.println("请输入数据"+(i+1));
rt[i] =er.nextInt();
}
int c =hka(rt[0],rt[1],rt[2]);
System.out.println(c);
}
public static int hka(int a ,int b ,int c){
if(a>b){
if(a>c){
return a;
}else {
return c;
}
}else
{
if(b>c){
return b;
}else{
return c;
}
}
}
}
|
|