职教组卷基于海量职教高考试题库建立的在线组卷及学习系统
职教组卷
  • 题型:程序分析题 题类:单元测试 难易度:中档

    以下程序的功能是从键盘上输入若干学生的成绩,统计并输出最高成绩和最低成绩,当输入负数时结束输入。请填空。
    main()
    { float x,amax,amin;
    scanf("%f",&x);
    amax=x;amin=x;
    while([1])
    { if(x>amax)amax=x;
    if([2])amin=x;
    scanf("%f",&x);}
    printf("\namax=%f\namin=%f\n", amax, amin); }
  • 相关试卷