#include
Int main ()
{
Int N, M, G, I, j, k, u, amunt, t=0, temp, [1000] a={0}, b [10], c [10], [1000] d;
Char n [20].
While (~ the scanf (" % d % d % d ", & amp; N, & amp; M, & amp; G))//input student number, number, fractional line;
{
If (N==0)
break;//student number is zero out;
The else
{
for(i=0; i
The scanf (" % d ", & amp; B [I]);//input each question score;
}
for(i=0; i
[I] gets (n);//enter student id;
The scanf (" % d ", & amp; Amunt);//input the students do on the number of questions;
for(j=0; j
The scanf (" % d ", & amp; C [j]);//input the students do on each topic qid;
for(k=1; K<=M; K++)
{
If [j]==k (c)
C=b [j] [k - 1);//the topic of score is assigned to the topic;
}
}
for(j=0; j
A [I]=[I] a + c [j];//calculate the total score of students;
}
If (a [I] & gt;=G)
{
T++;//if the student failed to pass the number plus one;
D] [t - 1=I;//to the serial number of the students write down;
}
}
For (u=0; U
for(j=0; j
Temp=d [j];
D [j]=d [j + 1);
D=\ [j + 1];//to sort to pass the exam scores;
}
}
Printf (" % d ", t);//output to pass the total number of students;
for(j=0; j
}
}
}
CodePudding user response:
This topic is a structure must be used to do?