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
Private Sub Form_Load()Show
Dim a!, b!, c!
MsgBox "求语数晌和外三门课宴搜盯程平均分"
b = Val(InputBox("请输入数学分数"))
c = Val(InputBox("请输入英语分数"))
x = (a + b + c) / 3
If x >漏悉= 60 Then
MsgBox "太棒了"
Else
MsgBox "要努力"
End If
End
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)