package com.web;
import java.util.Scanner;
public class Test33 {
public static void main(String[] args) {
while (true) {
Scanner scanner = new Scanner(System.in);
System.out.print("input the first number:");
int num1 = scanner.nextInt();
System.out.print("input the second number:");
int num2 = scanner.nextInt();
System.out.print("input the third number:");
int num3 = scanner.nextInt();
// 如何获取三个数据的最大值
int temp = num1>num2?num1:num2;
int max = temp>num3?temp:num3;
System.out.println("max = " + max);
}
}
}
11-02
464
05-22
1万+