问答题

3.已建立学生“英语”课程的成绩链表(成绩存于score域中,学号存于num域中),
     下列函数用于输出待补考学生的学号和成绩,及补考学生人数。
        void require(struct student *head)
       {   struct student *p;        ①         
           if( head!=NULL) {
                           ②          
              while(p!=NULL) {
                 if(      ③         ) {
                    printf(”%7d  %6.1f”,p->num,p->score);  n++;
          }
                 p=p->next;
        }
              printf(”%ld”, n);
      }
        }

答案: int n=0; p=head; p->score<60
微信扫码免费搜题