Answered You can hire a professional tutor to get the answer.

QUESTION

Each team working on a project consists of clients, coders, and managers. These members are represented by integer digits: 1 (clients), 2 (coders),...

Each team working on a project consists of clients, coders, and managers. These members are represented by integer digits: 1 (clients), 2 (coders), and 3 (managers). A long integer will be entered by the user which represents the number of individuals available for a project. The program should determine if the composition of available team members constitutes a valid team. (Using C programming Language)

A valid team is defined as:

1. At least two clients.

2. An even number of coders.

3. Exactly two managers.

Example Execution #1:

Enter the potential team members -> 2211223311

Composition of team

-> Managers: 2

-> Coders: 4

-> Clients: 4

Status of team: valid

Example Execution #2:

Enter the potential team members -> 221133333

Composition of team

-> Managers: 5

-> Coders: 2

-> Clients: 2

Status of team: invalid

-> Managers: Number of managers must be exactly two.

Example Execution #3:

Enter the potential team members -> 22222233

Composition of team

-> Managers: 2

-> Coders: 6

-> Clients: 0

Status of team: invalid

-> Clients: Number of clients must be at least two.

Example Execution #4:

Enter the potential team members -> 3311222

Composition of team

-> Managers: 2

-> Coders: 3

-> Clients: 2

Status of team: invalid

-> Coders: Number of coders must be even.

Example Execution #5 (it is possible that a potential team has a problem with more than one category of member,

zero is technically an even number):

Enter the potential team members -> 31

Composition of team

-> Managers: 1

-> Coders: 0

-> Clients: 1

Status of team: invalid

-> Managers: Number of managers must be exactly two.

-> Clients: Number of clients must be at least two.

Example Execution #6 (all three invalid messages):

Enter the potential team members -> 12323232323

Composition of team

-> Managers: 5

-> Coders: 5

-> Clients: 1

Status of team: invalid

-> Managers: Number of managers must be exactly two.

-> Coders: Number of coders must be even.

-> Clients: Number of clients must be at least two.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question