在窗体上画一个命令按钮,名称为Command1的命令按钮,然后编写如下程序: Private Sub Command1_Click() Dim a(4) As Integer, b(4) As Integer For k = 0 To 2 a(k + 1) = InputBox("请输入一个整数") b(3 - k) = a(k + 1) Next k Print b(k) End Sub 程序运行后,单击命令按钮,在输入对话框中分别输入2、4、6,输出结果为______。
A.
0
B.
2
C.
3
D.
4
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
皮皮学刷刷变学霸
举一反三
【单选题】下面代码的运行输出结果是( )。 public class example { public static void main(String args[]) { intX=0; if(X>0) X=1; switch(x) { case1: System.out.println(1); case0: System.out.println(0); case2: Syste...
【单选题】下面代码的运行输出结果是 public class Test { public static void main(String args[]) { int x = 0; if (x > 0) x = 1; switch (x) { case 1: System. out .println(1); case 0: System. out .println(0); case 2: System. ou...
【单选题】下面代码的运行输出结果是( )。 public class Conditional{ public static void main(String args[ ]){ int x=45; System.out.println(“value is”+((x>4) ?99.99 : 9) ); }