import java. util.Scanner;
class Test {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("输入第一个数字:");
int x = sc.nextInt();
System.out.println("输入的二个数字:");
int y = sc.nextInt();
System.out.println("输入的三个数字:");
int z = sc.nextInt();
int min =((((x < y) ? x : y) < z) ? ((x < y) ? x : y) : z);
System.out.println(min);
}
}
输出最小的值 |
|