#include using namespace std; void demo(){ float x, amax, amin; cin >> x; amax = x; amin = x; while(x >= 0){ if(x > amax) amax = x; if(x < amin) amin = x; cin >> x; } cout << "\namax = " << amax << "\namin = " << amin << endl; } int main(){ demo(); system("pause"); return 0; }

3程序填空:下面程序的功能是从键盘上输入若干学生的学习成绩统计并输出最高成绩和最低成绩当输入为负数时结束输入。在________处填入适当的语句实现程序的功能。#include iostream使用命名空间标准;无效演示;int main演示;系统暂停;返回 0;void demo浮点 X 阿马克斯 阿明;中 X;最大值 = x;阿明 = x;而__ x =0_________如果x amax最

原文地址: http://www.cveoy.top/t/topic/hvfV 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录