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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started