[单项选择题] 下面程序段的输出结果是 public class Test public static void main(String args[])int n=5,sum=O;while(n
21 查阅
[单项选择题] 下面程序段的输出结果是
public class Test
public static void main(String args[])
int n=5,sum=O;
while(n>0)
sum+=n;
--n;
System.out.println("sum is "+Sum);A.sum is 14
B.sum is 15
C.sum is 10
D.sum is 5
参考答案: