题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-15 07:57:24

[填空题]以下程序的功能是:从键盘上输入若干个学生的成绩,计算出乎均成绩,并输出低于平均分的学生成绩,用输入负数结束输入。
Dim x(10),sum,ave,a,n,i
n=0
sum=0#
a=InputBox("Enter mark:")
Do While a>=0 And n<10
sum= 【12】
x(n)= 【13】
n=n+1
a=InputBox("Enter mark:")
Loop
ave= 【14】
Print "Output:"
Print "ave=";ave
For i=0 To n-1
If 【15】 Then
Print x(i)
End If

更多"以下程序的功能是:从键盘上输入若干个学生的成绩,计算出乎均成绩,并输出"的相关试题:

[填空题]以下程序的功能是:从键盘上输入若干个学生的成绩,计算出乎均成绩,并输出低于平均分的学生成绩,用输入负数结束输入。
Dim x(10),sum,ave,a,n,i
n=0
sum=0#
a=InputBox("Enter mark:")
Do While a>=0 And n<10
sum= 【12】
x(n)= 【13】
n=n+1
a=InputBox("Enter mark:")
Loop
ave= 【14】
Print "Output:"
Print "ave=";ave
For i=0 To n-1
If 【15】 Then
Print x(i)
End If
[填空题]以下程序的功能是:从键盘上输入若干个数字,当输入负数时结束输入,统计出若干 数字的平均值,显示结果。请填空。 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
[填空题]以下程序的功能是:从键盘上输入若干个学生的考试分数,当输入负数时结束输入,然后输出其中的最高分数和最低分数。在【12】和【13】处填入适当的内容,将程序补充完整。
Private Sub Form_Click( )
Dim x As Single,amax As Single,amin As Single
x=InputBox("Enter a score")
amax=x
amin=x
Do While 【12】
If x>amax Then
amax=x
End If
If 【13】 Then
amin=x
End If
x=InputBox("Enter a score")
Loop
Print"Max=";amax,"Min=";amin
End Sub
[填空题]以下程序的功能是从键盘上输入若干个字符(以回车键作为结束)组成一个字符串存入一个字符数组,然后输出该字符数组中的字符串。
main( )
char str[51],*sptr;
int i;
for(i=0;i<50;i++)
str[i]=getchar( );if(str [j]==’/n’)______;
str[i]:______;
sptr=str;
while(*sptr)putchar(*sptr______);

[填空题]从键盘上输入若干个学生成绩,统计并输出最高成绩和最低成绩,当输入负数时结束输入。请填空。
main( )
float s,gmax,gmin;
scanf("%f,"&s);
gmax=s;gmin=s;
while(s>=0)
if(s>gmax)gmax=s;
if(______)gmin=s;
scanf("%f",&s);
printf("gmax=%f/ngmin=%f/n"gmax,gmin);
[填空题]以下程序的功能是:通过函数func输入字符并统计输入字符的个数。输入时用字符@作为输入结 束标志。请填空。 #include long 【 】 ;/* 函数说明语句 */ main( ) {long n; n=func( );printf("n=%1d/n",n); } long func( ) { long m; for(m=0;getchar( )!=@;【 】); return m; }

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码