网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

下列程序的执行结果是( )。 Privaae Sub Form_Activate Dim score(3)As Integer,total As Integer Dim aa_score As Variant score(1)=50:score(2)=14:score(3)=36 total=0:i=0 For Each aa_score In score i=i+1 total=total+aa_score Print i,aa_score,total Next End Sub

A.1 0 0 2 50 50 3 14 64 4 36 100

B.1 50 50 2 14 64 3 36 100

C.0 50 50 1 14 64 2 36 100 3 36 100

D.0 0 0 1 50 50 2 14 64


参考答案

更多 “ 下列程序的执行结果是( )。 Privaae Sub Form_Activate Dim score(3)As Integer,total As Integer Dim aa_score As Variant score(1)=50:score(2)=14:score(3)=36 total=0:i=0 For Each aa_score In score i=i+1 total=total+aa_score Print i,aa_score,total Next End SubA.1 0 0 2 50 50 3 14 64 4 36 100B.1 50 50 2 14 64 3 36 100C.0 50 50 1 14 64 2 36 100 3 36 100D.0 0 0 1 50 50 2 14 64 ” 相关考题
考题 ( 8 )阅读下列程序段public class OperatorsAndExpressions {String conditionalExpression ( int score ) {String result;//如果 score 超过 60 分,则结果是 passed, 否则是 doesn't passresult= ( score=60 ) ?"passed":"doesn't pass" :System.out.println ( result ) ;return result;}public static void main ( String args[] ){OperatorsAndExpressions perAndExp=new OperatorsAndExpressionsQ;//条件表达式OperAndExp. conditionalExpression ( 65 ) ;}}其执行结果是 【 8 】

考题 阅读下列程序段public class OperatorsAndExpressions {String conditionalExpression(int score) {String result;//如果score超过60分, 则结果是passed, 否则是doesn't passresult=-(score>=60)?"passed":"doesn't pass";System.out.println(result);retum result;}public static void main(String args[]) {OperatorsAndExpressions perAndExp=new OperatorsAndExpressions();//条件表达式OperAndExp.conditionalExpression(65);}}其执行结果是【 】 。

考题 阅读下面程序public class OperatorsAndExpressions {String conditionalExpression(int score) {String result;//如果score超过60分,则结果是passed,否则是doesn't passresult=(score>=60)?"passed":"doesn't pass":System.out.println(result);return result;}public static void main(String args[]) {OperatorsAndExpressions perAndExp=new OperatorsAndExpressions();//条件表达式OperAndExp.conditionalExpression(65);}}程序的执行结果是______。

考题 有如下程序段,该程序段执行完后,执行循环的次数是 total=0 Counter=1 Do Print Counter total=total + Counter Print total Counter=Counter+1 If total>10 Then Exit Do End If Loop While Counter <=10A.5B.10C.15D.20

考题 有如下程序total=OFor k=l TO 3If k>=1 Thenpart=1ElseIf k>=2 Thenpart=2ElseIf k>=3 Thenpart=3Elsepart=4End IfPrint part;total=total+partNext kPrint total运行时输出的结果是【 】。

考题 下列程序段的执行结果为 a=75 If a > 60 Then Score=1 If a > 70 Then Score=2 If a > 80 Then Score=3 If a > 90 Then Score=4 Print "Score= ";ScoreA.Score=1B.Score=2C.Score=3D.Score=4

考题 下列程序段执行后,输出结果是: def square(x): total = x * x x += total x = -5 total = 0 square(x) print(x, total, sep=',')A.出错B.-5,25C.20,25D.-5,0

考题 下列程序的输出结果是 int total = 0; for (int i = 0; i < 4; i++ ){ total += i; if (i == 2) break; } System.out.println(total);A.1B.3C.5D.6

考题 有如下程序段: int total = 0; for (int i = 0; i < 4; i++ ){ if (i == 1) continue; if (i == 2) break; total += i; } 则执行完该程序段后total的值为:()A.0B.1C.3D.6