更多"以下程序的功能是从键盘输入若干个学生的考试成绩,统计并输出最高分和最低"的相关试题:
[填空题]以下程序的功能是从键盘输入若干个学生的考试成绩,统计并输出最高分和最低分,当输入负数时结束输入。请填空。
Private Sub Command1_Click( )
Dim x,amax,amin As Single
x=InputBox("Enter a score")
amax=x
amin=x
Do While______
If x>amax Then
amax=x
End If
If______Then
amin=x
End If
x=InputBox("enter a score")
Loop
Print "max=";amax,"min=";amin
End Sub
[填空题]以下程序的功能是从键盘输入若干个学生的考试成绩,统计并输出最高分和最低分,当输 入负数时结束输入,输出结果。请补充完整下列程序段。
Dim x,amax,amin As Single
x=InputBox("Enter a score")
amax=x
amin=x
Do While【 】
If x>amax Then
amax=x
End If
If【 】Then
amin=x
End If
x=InputBox("enter a score")
Loop
Print"max=";amax,"min=";amin
[填空题]以下程序的功能是:从键盘上输入若干个数字,当输入负数时结束输入,统计出若干
数字的平均值,显示结果。请填空。
Private Sub Form_click( )
Dim x,y As Single
Dim z As Integer
x=InputBox("Enter a score")
Do while 【13】
y=y+x
z=z+1
x=InputBox("Enter a score")
Loop
If z=0 Then
z=1
End If
y=y/z
msgbox y
End Sub
[填空题]以下程序的功能是:从键盘上输入若干个数字,当输入负数时结束输入,统计出若干
数字的平均值,显示结果。请填空。
Private Sub Form_click( )
Dim x,y As Single
Dim z As Integer
x=InputBox("Enter a score")
Do while 【13】
y=y+x
z=z+1
x=InputBox("Enter a score")
Loop
If z=0 Then
z=1
End If
y=y/z
msgbox y
End Sub
[填空题]以下程序的功能是:从键盘上输入若干个数字,当输入负数时结束输入,统计出若干数字的平均值,输出结果。请填空。
Private Sub Form_click( )
Dim x,y As Single
Dim z As Integer
x=InputBox("Enter a score")
Do while 【8】
y=y+x
z=z+1
x=InputBox("Enter a score")
Loop
If z=0 Then
z=1
End If
y= 【9】
Print y
End Sub