//创建方法求两个数的最大值max2,随后再写一个求3个数的最大值的函数max3。//要求:在max3这个函数中,调用max2函数,来实现3个数的最大值计算public static int max3(int a, int b, int c) {int max = max2(max2(a, b), c);return max;}public static int max2(int m, int n) {int max = m > n ? m : n;return max;}public static void main(String[] args) {Scanner scan = new Scanner(System.in);int a = scan.nextInt();int b = scan.nextInt();int c = scan.nextInt();int ret = max3(a, b, c);System.out.println(ret);}
}