以下哪条语句表示“如果radius为正,则显示圆的面积”?
A. if (radius != 0) System.out.println(radius * radius * 3.14);
B. if (radius >= 0) System.out.println(radius * radius * 3.14);
C. if (radius > 0) System.out.println(radius * radius * 3.14);
D. if (radius <= 0) System.out.println(radius * radius * 3.14);
假设income的值为4001,下面代码的输出是_________if (income > 3000) { System.out.println("Income is greater than 3000"); } else if (income > 4000) { System.out.println("Income is greater than 4000"); }
A. Income is greater than 3000
B. Income is greater than 3000 followed by Income is greater than 4000
C. Income is greater than 4000
D. Income is greater than 4000 followed by Income is greater than 3000
以下代码的输出是_________?double temperature = 50; if (temperature >= 100) System.out.println("too hot"); else if (temperature <= 40) System.out.println("too cold"); else System.out.println("just right");
A. too hot
B. too cold
C. just right
D. too hot too cold just right