Question: Define an array named PeopleTypes that can store a maximum of 50 integers values that will be entered at the keyboard. Enter a series of

Define an array named PeopleTypes that can store a maximum of 50 integers values that will be entered at the keyboard. Enter a series of 1s, 2s, 3s, and 4s into an array, where a 1 represents an infant, a 2 represents a child, a 3r 3 represents a teenager, and a 4 represents an adult who was a present at a local school function. Any other integer value should not be accepted as valid input and data entry should stop when a negative value has been entered.

The C program should count the number of each 1, 2, 3, and 4 in the array and output a list of how many infants, children, teenagers, and adults were at the school function.

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!