题解 | #小乐乐算多少人被请家长#
小乐乐算多少人被请家长
https://www.nowcoder.com/practice/1654083e09d2432aa24b151d36309155
#include<stdio.h> typedef struct student ss; struct student{ int score[3]; int sum; int aver; }; int main() { int n,count=0; scanf("%d",&n); getchar(); ss stu[n]; for(int i=0;i<n;i++){ stu[i].sum=0; for(int j=0;j<3;j++){ scanf(" %d",&stu[i].score[j]); // scanf("%d ",&stu[i].score[j]);//err stu[i].sum+=stu[i].score[j]; } getchar(); stu[i].aver=stu[i].sum/3; if(stu[i].aver<60) count++; } printf("%d",count); return 0; }