Home > Back-end >  Is excuse me this program output the number of students didn't pass the exam, but why can not g
Is excuse me this program output the number of students didn't pass the exam, but why can not g

Time:02-23

CodePudding user response:

Reference contrast:
 # include & lt; Stdio. H> 
# define 40 N
Int Func (int a [], int n);
Int main ()
{
Int n, I, a [n], ret.

The scanf (" % d ", & amp; N);//input the number of students

for(i=0; i{
The scanf (" % d ", & amp; A [I]);//the scanf (" % d ", a [I]); Input result
//break;//this extra
}
Ret=Func (a, n);
Printf (" % d ", ret);
return 0;
}

Int Func (int a [], int n)
{
Int I, count=0;//m
for(i=0; i{
//m=a, [I].//this can need not
If (a [I] {
count++;
}
}
return count;
}


//8
//75 87 54 36 92 64 52 53
//4 please press any key to continue...
  • Related