[填空题] 设有数组定义:int MyIntArray[]={10,20,30,40,50,60,70};则执行下面几个语句后的输出结果是 【10】 。int s=0;for(int i=0;i<MyIntArray.length;i++)s+=MyIntArray[i];System.out.println(s);
正确答案:280
参考解析:本题中数组的元素个数是7个,则它的下标范围是0~6,所以本题表示的意思是计算数组中元素的和。

[填空题] 设有数组定义:int MyIntArray[]={10,20,30,40,50,60,70};则执行下面几个语句后的输出结果是 【10】 。int s=0;for(int i=0;i<MyIntArray.length;i++)s+=MyIntArray[i];System.out.println(s);
正确答案:280
参考解析:本题中数组的元素个数是7个,则它的下标范围是0~6,所以本题表示的意思是计算数组中元素的和。
下一篇 [填空题] 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1 Click() n = 5 f = 1 s = 0 For i=1