更多"以下程序的功能是从键盘输入若干学生的成绩,并输出最高成绩和最低成绩,当"的相关试题:
[填空题]以下程序的功能是从键盘输入若干学生的成绩,并输出最高成绩和最低成绩,当输入负数时结束。请填空。
main( )
float x,amax,amin;
scanf("%f",&x);
amax=x; amin=x:
while( (7) )
if(x>amax) amax=X;
else
if (8) amin=X;
else scanf("%f",&x);
printf("/n amax=%f/n amin=%f/n",amax,amin);
[填空题]以下程序的功能是从键盘输入若干学生的成绩,并输出最高成绩和最低成绩,当输入负数时结束。请填空。
main( )
float x,amax,amin;
scanf("%f",&x);
amax=x; amin=x:
while( )
if(x>amax) amax=X;
else
if amin=X;
else scanf("%f",&x);
printf("//n amax=%f//n amin=%f//n",amax,amin);
[填空题]以下程序的功能是从键盘输入若干学生的成绩,并输出最高成绩和最低成绩,当输入负数时结束。请填空。
#include <stdio.h>
main( )
float x,amax,amin;
scanf("%f",&x);
amax=x; amin=x;
while( 【7】 )
if(x>amax)amax=x;
else
if( 【8】 ) amin=x;
scanf("%f",&x);
printf("/n amax=%f/n amin=%f/n",amax,amin);
[填空题]以下程序的功能是从键盘输入若干学生的成绩,并输出最高成绩和最低成绩,当输入负数时结束。请填空。
#include <stdio.h>
main( )
float x,amax,amin;
scanf("%f",&x);
amax=x; amin=x;
while( )
if(x>amax)amax=x;
else
if( ) amin=x;
scanf("%f",&x);
printf("//n amax=%f//n amin=%f//n",amax,amin);
[填空题]以下程序的功能是:从键盘输入若干个学生的成绩,统计出最高成绩和最低成绩,当输入负数时结束输入。
#include<stdio.h>
main( )
float x,amax,amin;
scanf("%f",&x);
amax=x:
amin=x;
while( )/*第一空*/
if(______)amax=x;/*第二空*/
if(x<amin)______;/*第三空*/
scanf("%f",&x);
printf("amax=%3.2f,amin=%3.2f/n",amax,amin);
[填空题]以下程序的功能是从键盘输入若干个学生的考试成绩,统计并输出最高分和最低分,当输入负数时结束输入。请填空。
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