📜  Java 程序使用嵌套 if 查找三个数字中的最大值 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:43.433000             🧑  作者: Mango

代码示例1
public class Main{public static void main(String[] args) {double a = 500, b = 1000, c = 1500;if( a >= b && a >= c)System.out.println(a + " largest number");else if (b >= a && b >= c)System.out.println(b + " largest number");elseSystem.out.println(c + " largest number");}}