问题 填空题

学生的某次课程测验中,选择题的答案已记录在列表框list1中,其数据行格式是:学号为6个字符长度,2个空格,选择题的答案为15个字符长度,程序根据标准答案进行批改,每答对一题给1分,并将得分存放到列表框list1中,标准答案存放在变量Exact中。

Option Explicit

Private Sub Command1_click()

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=()

Anw=()

StudId=Left(Anw,6)

Anw=Right(Anw,Len(Anw)-8)

()

For J=1 to Len(Anw)

If () Then

Scor=Scor+1

End If

Next J

List2.AddItem StudId & “ “ & Scor

Next I

End Sub

答案

参考答案:0 To Listl.ListCount-1;Listl.List(I);Scor=0;Mid(Anw,J,1)=Mid(Exact,J,1)

多项选择题
问答题 论述题