填空题 学生的某次课程测验中,选择题的答案已记录在列表框list1中,其数据行格式是:学号为6个字符长度,2个空格,选择题的答案为15个字符长度,程序根据标准答案进行批改,每答对一题给1分,并将得分存放到列表框list1中,标准答案存放在变量Exact中。 Option Explicit Private Sub Command1_click1 Dim Anw as string , StudId as string Dim Scor as Integer, Exact as string Dim I as Integer, J as integer Exact=”ABCCBAACBBDCCDA” For I=( 19 ) Anw=( 20 ) StudId=Left(Anw,6) Anw=Right(Anw,Len(Anw)-8) ( 21 ) For J=1 to Len(Anw) If ( 22 ) Then Scor=Scor+1 End If Next J List2.AddItem StudId & “ “ & Scor Next I End Sub
  • 1、
【正确答案】 1、(19)0 To Listl.ListCount-1 (20)Listl.List(I) (21)Scor=0 (22)Mid(Anw,J,1)=Mid(Exact,J,1)    
【答案解析】