全国计算机等级考试C语言考试程序改错题(8)

发布时间:2019-02-04 19:04:07

在考生文件夹下,给定程序MODI.C的功能是:

学习优良奖的条件如下:所考5门课的总成绩在450分(含)以上;或者每门课都在88分(含)以上。输入某学生5门课的考试成绩,输出是否够学习优良奖的条件。

 

  #include

  main()

  {

    int score,sum=0;

    int i,n=0;

    for(i=1;i<=5;i )

    { scanf("%d",&score);

      sum =score;

if(score>=88) n ;

  /************found************/

      if(score<=88) n ;

    }

if(sum>=450 || n==5 )

  /************found************/

    if(sum>=450 && n==5 )

      printf("The student is very  good!n");

    else

      printf("The student is not very good!n");

  }

阅读更多其他试题,请访问生活日记网 用日志记录点滴生活!考试试题频道。
喜欢考试试题,那就经常来哦

该内容由生活日记网提供.