填空题
以下程序的功能是从键盘输入若干学生的成绩,并输出最高成绩和最低成绩,当输入负数时结束。请填空。
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);
【参考答案】
x>0
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
程序时输入1234567,则输出结果是______。#include main() int a=1,b; scanf( %2d%2d ,&a,&b); printf( %d %d n , a,b);
点击查看答案
填空题
阅读下面程序,则执行后的输出结果是______。 #include stdio.h main() int x,y,z; x=1;y=2;z=3; if(x>y)if(x>z)printf( %d ,x); else printf( %d ,y); printf( %d n ,z);
点击查看答案&解析
相关试题
x<amin
i
下列程序的运行结果是______。 #de...
以下程序中函数huiwen的功能是检查一个字符...
以下程序是求矩阵a、b的和,结果存入矩阵c...