option explicit dim fso,line,data,grade,avg,sum dim inFile,i sum = 0 Set fso = CreateObject("Scripting.FileSystemObject") set inFile = fso.openTextFile("grade.dat",1) line = infile.readline() do while not infile.AtEndOfStream data = spit(line) for i = 1 to 4 sum = sum + data(i) next avg = sum/4 grade = getGrade(avg) write(data(0) & vaTab & avg & vbTab & grade & vbCrLf) sum = 0 line = infile.readline() Loop infile.close() function getGrade(n) dim grade if n >= 90 then grade = "A" elseif n >= 80 then grade = "B" elseif n >= 70 then grade = "C" elseif n >= 60 then grade = "D" else grade = "F" end if getGrade = grade end function sub write(s) wscript.stdout.write(s) end sub

who can help me correct it