试题 试卷
题型:单选题 题类:常考题 难易度:普通
算法与程序设计
x=″abcdcba″:ans=0
For i=1 To Len(x)\2
If Mid(x,i,1)=Mid(x,Len(x)-i+1,1) Then
ans=ans+1
end if
Next i
Text1.Text=Str(ans)
Private Sub Command1_Click()
For i=1 To 4
s=””
For j=1 To 7
If Then
s=s+“*“
Else
s=s+” ” ‘双引号内为1个空格
End If
Next j
List1.AddItem s
End Sub
则方框中的语句是 ( )
max=10 000
For i=1 To 10
s=0
For j=i To 10
s=s+a(j)
If s>max Then max=s
已知数组a(1)到a(10)的原始数据为6,-6,8,-7,7,2,-2,-1,-2,4。程序执行后,变量max的值为( )
试题篮