Question: You are working for the census bureau and you need to write a program in C++ to do the following: A). Count the number of

You are working for the census bureau and you need to write a program in C++ to do the following:

A). Count the number of people in each of the following age groups: 0-18 infant, 18-29 young, 29 - 50 middle aged, 50 - 69 old, 69 - and older really old. Report the number of people in each of the following age groups (use some random data for test): 0-18 (infant), 18-29 (young), 29-50(middle-aged), 50-69 (old), 69-and older (really old). Report the number of people in each age group.

B). They need some statistics regarding the distribution of ages. Write a program to read in the ages that will be input by the user in an array. Compute the average age (mean) and the mode i.e. the age that occurs most frequently (be careful, some of the ages might be the same). Ages should be read in as integers, the average should be a real number. Also calculate the standard deviation using the formula:

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!