阅读下面程序,最终的输出值是? var_A = 100 if var_A > 60: var_A += 10 else: var_A -= 10 var_A += 3 print var_A
第1题:
如果A为整数且,|A|>=10,则打印“OK”,否则打印“Error”,表示这个条件的单行格式If语句是( )。
A.If Int(A)=A And Sqr(A)>=10 Then Print"OK"Else Print "Error"
B.If Fix(A)=a And Abs(A)>=-10 Then Print"OK"Else Print "Error"
C.If Int(A)=A And(A>=10,A<-10) Then Print"OK"Else Print "Error"
D.If Fix(A)=A And A>=10,And A<=-10 Then Print"OK" Else Print "Error"
第2题:
已知x代表某个百分制成绩,下列程序段用于显示对应的五级制成绩,正确的是( )
A.If x>=60 Then Print"及格" Else If x>=70 Then Print"中" Else If x>=80 Then Print"良" Else If x>=90 Then Print"优" Else Print"不及格" End If
B.If x<90 Then Print"良" Else If x<80 Then Print"中" Else If x<70 Then Print"及格" Else If x<60 Then Print"不及格" Else Print"优" End If
C.If x>=90 then Print"优" Else If x>=80 Then Print"良" Else If x>=70 Then Print"中" Else If x>=60 Then Print"及格" Else Print"不及格" End If End Select
D.Select Case x Case x>=90 Print"优" Case x>=80 Print"良" Case x>=70 Print"中" Case x>=60 Print"及格" Case Else Print"不及格"
第3题:
下面程序计算并输出的是( )。 Private Sub Command1 Click( ) a=10 s=0 Do s=s+a*a*a a=a-1 Loop Until a<=0 Print s End Sub
A.13+23+33+…+103的值
B.10!+…+3!+2!+1!的值
C.(1+2+3+…+10)3的值
D.10个103的和
第4题:
执行下面程序中的输出语句后,a的值是( )。 #include <stdio.h> main() { int a; printf("%d\n",(a=3*5,a*4));
A.15
B.20
C.10
D.60
第5题:
下面程序运行后的输出结果是______。Private Sub Command1_ Click ( ) for j = 1 To 10 if j Mod 3 <> 0 then a =a+j\3 Next j Print aEnd Sub
A.20
B.10
C.3
D.9
第6题:
阅读下列程序: Private Sub Form Click() Dim i As Integer, sum As Integer For i = 2 To 10 If i Mod 2 <> 0 Then Print i; Else sum = sum + i End If Next i Print sum End Sub 程序运行后,单击窗体,在窗体上的输出结果是
A.3 5 7 9 30
B.1 3 5 7 9
C.2 4 6 8 20
D.11 15 17 19 20
第7题:
下列程序段,在运行时最后输出的内容是 a=2 c=3 AAA: c=c * a If c〈10 Then Print c GoTo AAA Else Print“10以内的奇数显示完毕” End If
A.3
B.7
C.9
D.10以内的奇数显示完毕
第8题:
下面程序输出的结果是( )。 main() { int x=100,a=10,b=20,ok1=5,ok2=0; if(a<b) if(b!=15) if(!ok1) x=-i; else if(ok2) x=10; x=1; printf("%d\n",x); }
A.-1
B.0
C.1
D.不确定的值
第9题:
A.10
B.100
C.10100
D.10010
第10题:
下面程序运行后的输出结果是 Private Sub Command1_Click() For j=1 To 10 If j Mod 3<>0 Then a=a+j\3 Next Print a End Sub
A.20
B.10
C.3
D.9
第11题:
b=10a=20ifa>b:print(‘abigger’)else:print(‘bbigger’)以上代码输出内容是()
第12题:
0
10
-10
程序异常
第13题:
下面程序 main() { int x=100, a=10, b=20, ok1=5, ok2=0; if(a<b) if(b!=15) if(!ok1) x=1; else if(ok2)x=10; x=1; printf("%d\n",x); } 的输出是______。
A.-1
B.0
C.1
D.不确定的值
第14题:
下面程序 main() { int x=100,a=10,b=20,okl=5,ok2=0; if(a<B) if(b!=15) if(!ik1) x=1; else if(ok2)x=10; x=-1; printf("%d\n",x); } 的输出是______。
A.-1
B.0
C.1
D.不确定的值
第15题:
请阅读下面程序程序运行结果中在”length=”后输出的值是( )。
A.10
B.4
C.20
D.30
第16题:
下列程序段,在运行时最后输出的内容是 a=2 c=1 AAA: c=c+a If c<10 Then Print c GoTo AAA Else Print "10以内的奇数显示完毕" End If
A.3
B.7
C.9
D.10以内的奇数显示完毕
第17题:
下列程序段,运行后输出的内容是 a=2 c=1 c=c+a If c<10 Then Print c Else Print a End If
A.3
B.7
C.9
D.6
第18题:
下列程序段,在运行时最早输出的内容是 a=2 c=1 AAA: c=c + a If c<10 Then Print c GoTo AAA Else Print"10以内的奇数显示完毕。" End If
A.3
B.7
C.9
D.6
第19题:
下列程序段,在运行时最后输出的内容是 a=2 c=1 AAA: c=c + a If c<10 Then Print c GoTo AAA Else Print "10以内的奇数显示完毕" End If
A.3
B.7
C.9
D.10以内的奇数显示完毕
第20题:
A.10
B.100
C.10100
D.10010
第21题:
A.10
B.100
C.10100
D.10010
第22题:
scala中下面对于For循环打印出来说法正确的是?()
第23题:
a=10ifa==10:print(a-10)else:print[a]程序的输出结果是()。
第24题:
abigger’
bbigger’
10
20