问题详情

答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关

以下程序的功能是从健盘输入若干学生的成绩,并输出最高成绩和最低成绩,当输入负数时结


以下程序的功能是从健盘输入若干学生的成绩,并输出最高成绩和最低成绩,当输入负数时结束。请填空。

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);

}

参考答案
您可能感兴趣的试题