dim i as integer dim sum as single dim Mymax as single dim Mymin as single dim MyAvg as single dim x as single x=val(inputbox("输入第1个成绩:")) sum=x
Mymax=x Mymin=x for i=2 to 10 x=val(inputbox("输入第" & i & "个成绩:")) sum = sum + x if x>Mymax Then Mymax =x if x<Mymin Then Mymin =x next i MyAvg = sum /10 print "最高分:";Mymax print "最低分:";Mymin print "平均分:";MyAvg