试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省桐乡市茅盾中学2015-2016学年高一下学期期中考试信息技术试题
n=Len(Text1.Text):c=1
For i=1 To n
s=Mid(Text1.Text,i,1)
If s>=“0”And s<=“9”Then
a(c)=a(c)*10+Val(s)
Else
If a(c)>0 Then c=c+1
End If
Next i
在文本框Text1中输人“No1:X:123:Y:680:End”。执行该程序段后,数组a(2)的值为( )
Dim i As Integer, s As Integer
Dim a (1 To 10)As Integer
For i =1 To 10
a(i)=i^2
If a(i)Mod 3=0 And a(i)Mod 5 =0 Then s= 50000+ a(i)
If a(i)Mod 3=0 Or a(i) Mod 5 =0 Then s =s+ a(i)
Text1. Text Str(s)
执行该程序段后,下列说法正确的是( )
s=input("请输入一串整数,以逗号间隔开来:")
t=""
sum=0
for i in ① :
if i!=", ":
②
else:
sum=sum+int(t)
print("该数据序列的和为:",sum)
试题篮