Make a simple student grade system with C

Updated on educate 2024-03-21
5 answers
  1. Anonymous users2024-02-07

    1. First of all, define a number of reed structure student, which contains the information of the student.

    2. Define two variables of type student, and save the grade information and temporary variables of all students.

    3. Define a custom function to enter the student's grade information.

    4. Realize the input of student information and calculate the total score.

    5. In the main function, first define the ruler with 4 integer variables, save the total number of students, and control the variables of the loop.

    6. Next, enter the total number of students and save it in the variable n.

    7. Enter the information of all students and save it in the array arr.

    8. Use 3 cycles to realize the sorting of students according to their student numbers. In the end, the total score of each student is output according to the student number.

  2. Anonymous users2024-02-06

    First, define a student structure, including the student's student ID, name, course grade array (floating-point array of 4 elements), average grade, overall grade, and an identifier (indicating excellent, good, and average).

    Second, define an array of structs with 50 elements, which is 50 students. and define excellent, good, and moderate variables to record the corresponding number of people;

    Thirdly, set the score line of excellent, good, and medium, which can be entered or preset;

    Finally, the average grade of each person is calculated and the excellent and good are determined. Medium, excellent, good, and medium variables +1 depending on the situation.

    The members of the struct array are set according to the situation, and must have at least the student's name (or student number) and the course grade array.

  3. Anonymous users2024-02-05

    Definition: Array a[50][4] 4 grades per student.

    Definition: Array b[50] The average grade per student.

    Definition: Array c[5] The number of people for each grade.

    Write a for() to record the grade.

    1. Find the average grade.

    for(i=0,i<50,i++)

    for(j=0,j<4,j++)

    b[i]=b[i]+a[i][j]

    b[i]=b[i]/4

    2. Find the number of 5 kinds of results.

    for(i=0,i<50,i++)

    if(b[i]>=90) c[0]=c[0]+1;

    else if (b[i] >=70 c[1]=c[1]+1;

    That's it. I haven't written it for a long time, and there may be some grammatical errors, so you can change it.

  4. Anonymous users2024-02-04

    It can be implemented with a linked list, which is easier to operate.

  5. Anonymous users2024-02-03

    Let's use C++, object-oriented, one class to do it.

Related questions
8 answers2024-03-21

It's nonsense to say so much above. Landlord please see: pay attention to your program: printf("%d,%d",(a,b),(b,a); >>>More

12 answers2024-03-21

Friend, the ** conditional stock selection formula you need to write has been debugged and passed in the straight flush version. Please see the attached drawing. >>>More

23 answers2024-03-21

There are many reasons why students in the same class are taught by the same teachers and learn the same courses, but their grades vary widely, mainly because of the differences in the students themselves. For example, each student's original knowledge base is different, some are good and some are bad; Each student's study habits are different, some are serious and willing to work hard, and some are sloppy; Each student's ability to accept knowledge is different, some students have strong receptivity and some students have weak receptivity; Each student's interests and hobbies are different, if they are interested in a certain course, they may have good grades, and if they are not interested, they may not learn well; Each student has different feelings towards the same teacher, and if they like the teacher's class, they may learn well if they don't like it, and so on.

11 answers2024-03-21

It's not interesting, it's just that there's these members and methods in this category.