Javaç¨åºä»£ç ï¼
public class test {
public static void main(String[] args) {
if(args.length < 3) {
System.out.println("åæ°å¤ªå°ï¼è¯·è¾å
¥3个åæ°ï¼ä»¥ç©ºæ ¼åå¼...");
return;
}
else if(args.length > 3) {
System.out.println("åæ°å¤ªå¤ï¼è¯·è¾å
¥3个åæ°ï¼ä»¥ç©ºæ ¼åå¼...");
}
double num1, num2, num3;
double sum, product, max, min;
num1 = Double.parseDouble(args[0]);
num2 = Double.parseDouble(args[1]);
num3 = Double.parseDouble(args[2]);
sum = num1 + num2 + num3;
product = num1 * num2 * num3;
max = (num1 > num2 ? (num1 > num3 ? num1 : num3) : (num2 > num3 ? num2 : num3));
min = (num1 < num2 ? (num1 < num3 ? num1 : num3) : (num2 < num3 ? num2 : num3));
System.out.println("ä¸æ°ä¹åï¼" + sum);
System.out.println("ä¸æ°ä¹ç§¯ï¼" + product);
System.out.println("ä¸æ°ä¹æ大å¼ï¼" + max);
System.out.println("ä¸æ°ä¹æå°å¼ï¼" + min);
}
}
è¿è¡æµè¯ï¼
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/ac6eddc451da81cb3cad7ad95a66d0160924315e?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)