import java.util.Scanner;
public class For {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("请输入a的值:");
int a = sc.nextInt();
System.out.println("请输入b的值:");
int b = sc.nextInt();
System.out.println("请输入c的值:");
int c = sc.nextInt();
int max = getMax(a, b, c);
System.out.print("最大值是" + max);
}
public static int getMax(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;
}
}
}
}