Question: * * * * CODE IN C * * * * A high school debate and speech club coach needs to form teams for the

****CODE IN C****
A high school debate and speech club coach needs to form teams for the upcoming competition. Students have different level of accumulated points from past debate and speech activities. For example, the club has 7 students, with points 4113768716067134.
The coach would like to form teams of students based on points, at beginner (25 points), honor (70 points), and excellence (125 points) levels. Student 1 and 2(with points 4113) will be in the beginner team because their levels are equal or closer to 25(than to 70 and 125), and student 346(with points 7687 and 67) will be in the honor team, and student 5 and 7(with points 160 and 134) will be in the excellence team.
Write a program that assign students to teams based on their accumulated points.
The program reads in the number of students, and their points.
Use an array to store points.
Use another array of the same size to store team assignment.
The program should include the following function:
void assign(int points[], int team_assignment[], int n);
The function calculates the team assignment and store the results in team_assignment array . Array points[] represents the points for each students. n is the total number of students.
Use library function abs is to return the absolute value of an integer. Include stdlib.h.
Follow the format in the examples.
Example #1
Enter number of students: 7
Enter points for each students: 8934143741622365
Beginner team: student 26
Honor team: student 147
Excellence team: student 35
Example #2
Enter number of students: 4
Enter points for each students: 722512865
Beginner team: student 2
Honor team: student 14
Excellence team: student 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!