Home > Back-end >  For why will appear this kind of circumstance want zha get urgent urgent!!!!!!
For why will appear this kind of circumstance want zha get urgent urgent!!!!!!

Time:12-05

Void InputClassInfor (Course c)
{//input teaching information
Printf (" please enter the name of a course curriculum: \ n ");
The scanf (" % s ", Arthur c. ourseName);
Getchar ();//ignore the blank space key
Printf (" please enter the course of the semester (input Numbers 1 to 8 in each one) : \ n ");
The scanf (" % d ", & amp; C.s. emester);
Printf (" please input the discipline nature of the course (enter a degree course or degree) : \ n ");
The scanf (" % s ", c.t ype);
Getchar ();//ignore the blank space key
The fflush (stdin);
Printf (" please enter the course teaching effect (type A, B, C, D in A) : \ n ");
C.t eceff=getchar ();
Getchar ();//remove the enter key
}

4/* */teachers continue to input information
Void InputInfor (the Teacher T [MAXTEACHERNUM])
{//input teachers information
Int I=0, flag=1, j=0;
TeacherNum=0;
Char ch, ch1;
While (flag)
{//input teachers information constantly, until the input "n"
Printf (" - & gt; Please enter the teacher staff number (3 digits) : \ n ");
The scanf (" % d ", & amp; T [I] num);
Printf (" - & gt; Please enter the teacher's name: \ n ");
The scanf (" % s ", & amp; T [I] name);
Printf (" - & gt; Please enter the teacher's gender (male or female) : \ n ");
The scanf (" % s ", & amp; T [I] sex);
Printf (" - & gt; Please enter the teacher's title: \ n ");
The scanf (" % s ", & amp; T [I] position);
For (j=0; J<3; J++)
{
Printf (" - & gt; Please enter the teacher the first % d on course information: \ n ", j + 1);
InputClassInfor (T [I]. Course [j]);
printf("\n");
}
Printf (" - & gt; Please enter the teacher's teaching effect comprehensive score (0-100) : \ n ");
The scanf (" % d ", & amp; T [I] tecscore);
TeacherNum++;//teachers record + 1
The fflush (stdin);
Printf (" do you want to continue the input? (Y/N (Y) (N)) \ N ");
Ch=getchar ();
Getchar ();//ignore the blank space key
If (ch=='N' | | ch=='N')//confirm if exit
flag=0;//modify logo, end cycle
}
}

Output teachers information *//* 5.
Void PrintInfor (the Teacher T [])
{//output all teachers information (in the form of a card)
int i=0;
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n \ n ");
Printf (" record | | all teachers \ n ");
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n \ n ");
Printf (" | disciplined in-service teachers % d, full information below | \ n ", TeacherNum);
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n \ n ");
For (I=0; i{
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n \ n ");
Printf (" | | worker, % 3 d sex | | | | name % s % s | | | title % s \ n ", T [I] num, T [I]. Name, T [I] sex, T [I] position);
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n \ n ");
Printf (" lectures on course 1 | | | | % s \ n ", T [I] course [1], courseName);
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n \ n ");
Printf (" | | term % % d | | course nature 8 c | | | teaching effect % s \ n ", T [I] course [2]. The semester, T [I] course [2]. The type, T [I] course [2]. Teceff);
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n \ n ");
Printf (" * speaker 2 course name % - 40 s * ", T [I] course [2], courseName);
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n \ n ");
Printf (" % % d * semester course effect 8 c "s teaching effect %, T [I] course [1]. The semester, T [I] course [1]. The type, T [I] course [1]. The teceff);
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n \ n ");
Printf (" * on 3 course name % - 40 s * \ n ", T [I] course [3], courseName);
Printf (" % d | | | term nature of the course teaching effect | | | % s % c | \ n ", T [I] course [1]. The semester, T [I] course [1]. The type, T [I] course [1]. The teceff);
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n \ n ");
Printf (" % 3 d | | teaching effect average marks \ n ", T [I] tecscore);
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n \ n ");
System (" PAUSE ");//upload a teacher information, wait for users to view and confirm and print the next teacher when confirmed information
}
}

{

CodePudding user response:

Code, run of the problem description clearly ~

CodePudding user response:

Well,,,, brother is you want to ask what is the problem

CodePudding user response:

Had better not use in the program "fflush (stdin);" Such a function call,
  • Related