网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下列语句的执行结果是什么?a=1foriinrange(5):ifi==2:breaka+=1else:a+=1print(a)
A.1
B.2
C.3
D.6
参考答案
更多 “ 下列语句的执行结果是什么?a=1foriinrange(5):ifi==2:breaka+=1else:a+=1print(a) A.1B.2C.3D.6 ” 相关考题
考题
写出下列语句的执行结果:______、______、______、______。 ?STR(141.2,6,2) ?STR(141.2,2,5) ?STR(141.2) ?STR(1221.26,5,2)
考题
以下程序的输出结果是main(){int a,i;a=0;for(i=1;i<5;i++){switch(i){case 0:case 3:a+=2;case 1:case 2:a+=3;default:a+=5;}}printf("%d\n",a);}A.31B.13C.10D.20
考题
下列程序段的执行结果为a=2b=0Select Case aCase 1Select Case bCase 0Print "**0**"Case 1Print "**1**"End SelectCase 2Print "**2**"End Select( )。A.**0**B.**1**C.**2**D.0
考题
下列程序段的执行结果为m=1n=1Select Case mCase 1Select Case nCase 0Print "**0**"Case 1Print "**1**"End SelectCase 2Print "**2**"End Select( )。A.**0**B.**1**C.**2**D.0
考题
下列程序的输出结果是()。 include main() {int a=0,i; for(i=1;i
下列程序的输出结果是( )。#include<stdio.h>main(){ int a=0,i;for(i=1;i<5;i++){ switch(i){ case 0:case 3:a+=1;case 1:case2:a+=2;default:a+=3;}}printf("%d",a);}A.19B.18C.6D.8
考题
假定有以下程序段For i=1 To 3For j=5 To 1 step -1Print i*jNext jNext i则语句 Print i*j 的执行次数是A ) 15B ) 16C ) 17D ) 18
考题
运行下列程序段,其中“n=n+1”语句被执行的次数是( )。Dim m%, n%For m = 1 To 3For n = 1 To 6 Step 2n = n + 1Print nNextNextA、 3B、 6C、 9D、 18
考题
下列程序的输出结果是( )。 #includestdio.h main( ) { int a=0,i; for(i=1;i5;i++) { switch(i) { case 0: case 3:a+=1; case 1: case 2:a+=2; default:a+=3; } } printf("%d",i); }A.19B.1C.6D.8
考题
下列程序的输出结果是()。includemain(){int a=0,i; for(i=1;i
下列程序的输出结果是( )。 #include<stdio.h> main() { int a=0,i; for(i=1;i<5;i++) { switch(i) { case 0: case 3:a+=1; case 1: case 2:a+=2; default:a+=3; } printf("%d",A) ; }A.19B.18C.6D.8
考题
设有定义:inta=0,b=5,c;执行语句c=(a=b)||++adoublex=1.34,y=5.3;下列表达始中,符合C++语法的是()。
A、a+=a-=(a=3)*(b=4)B、x%5C、a=a*3=2D、y=float(i)++
考题
请完成下列Java程序。程序的输出结果:a=6,b=5。注意:请勿改动main()主方法和其他已有语句内容,仅在下划线处填入适当的语句。程序运行结果如下:public class ex38_2{public static void main(String args[]){int a=5,b=6;a=_________;b=a-b;a=_________;System.out.println("a="+a+"\tb="+b);}}
考题
下列程序段的执行结果为m=1n=1Select Case mCase 1Select Case nCase 0print "A"Case 1Print "B"End SelectCase 2Print "C"End SelectA.AB.BC.CD.0
考题
下列程序的输出结果是( )。#includestdio.hmain{ int a=0,i;for(i=1;i5;i++){ switch(i){ case 0:case 3:a+=1;case 1;case 2:a+=2;default:a+=3;}}printf(%d,a);}A.19B.1C.6D.8
考题
已知字母a的ASCII十进制代码为97,则执行下列语句后的输出结果为(). char a=’a’; a--; printf("%d,%c/n",a+’2’-’0’,a+’3’-’0’);A、b,cB、a--运算不合法,故有语法错C、98,cD、格式描述和输出项不匹配,输出无定值
考题
单选题设有语句inta=3;则执行了语句a+=a-=a*a;后,变量a的值是()A
3B
0C
9D
-12
热门标签
最新试卷