#include<stdio.h>
#define N 40
int FailNum(int score[],int n);
void ReadScore(int score[],int n);
int main()
{
int score[N],n;
printf("Input n:");
scanf("%d",&n);
ReadScore(score,n);
FailNum(score,n);
printf("FailNum students are %d\n",FailNum(score,n));
return 0;
}
int FailNum(int score[],int n)
{
int i,count=0;
for(i=0;i<n;i++)
{
if(score[i]<60)
count++;
}
return count;
}
void ReadScore(int score[],int n)
{
int i;
printf("Input score:");
for(i=0;i<n;i++)
{
scanf("%d",&score[i]);
}
}
8.4
最新推荐文章于 2021-12-21 20:43:50 发布