import java.util.Scanner;
class IfYuJu{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
System.out.println("请输入第一个数据");
int a = sc.nextInt();
System.out.println("请输入第二个数据");
int b = sc.nextInt();
System.out.println("请输入第三个数据");
int c = sc.nextInt();
int max=0;
if (a>=b && a>=c){
max = a;
}else if(b>=a && b>=c){
max = b;
}else if(c>=a && c>=b){
max = c;
}
System.out.println("max:"+max);
}
} |
|