解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class C1006 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
int result = max(a, b, c);
System.out.println(result);
}
}
public static int max(int a, int b, int c) {
if(a > b && a > c){
return a;
}else if(b > c && b > a){
return b;
}else{
return c;
}
}
}
0.0分
0 人评分