Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

* * * * 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 1 Lncs 8055

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013 Edition

3642402844, 978-3642402845

More Books

Students also viewed these Databases questions

Question

Stages of a Relationship?

Answered: 1 week ago