Home / Expert Answers / Computer Science / nbsp-this-assignment-is-about-1-d-arrays-in-c-the-assignment-can-be-summarized-as-follows-1-pa464

# (Solved):   This assignment is about 1-D arrays in C. The assignment can be summarized as follows: 1. ...

This assignment is about 1-D arrays in C. The assignment can be summarized as follows: 1. You need to ask the users about 20 different people's ages. a. However, age can should be greater than or equal to 0 and less than or equal to 99 . You should print out a warning for any value outside of this range and want the user to enter another age again for the corresponding person. This process should be repeated until the user enters a valid age. 2. Upon collecting valid ages from the user, you should print the list of ages collected from the user. 3. Then, you should print out some statistics about data, namely, mean, variance and standard deviation of the ages. 4. As a last step you should draw histogram of the ages for the following ranges, $$0-9,10-19,20$$ $$29,30-39,40-49,50-59,60-69,70-79,80-89,90-99$$. The histogram shows the frequency of the above ranges. Formulas for stats: Mean $\bar{x}=\frac{1}{N} \sum_{i=1}^{N} x_{i}$ Variance $\sigma^{2}=\frac{\sum_{i=1}^{N}\left(x_{i}-\bar{x}\right)^{2}}{N}$ Standard deviation $\sigma=\sqrt{\sigma^{2}}$

We have an Answer from Expert

### Expert Answer

Question: You need to ask the users about 20 different people's ages. a. However, age can should be greater than or equal to 0 and less than or equal
We have an Answer from Expert