Due: Wednesday, June 5th
Write a program which will compute some randomly chosen ages, and create some
statistics based upon those ages. See the examples done in class for information
on srand, rand and the new includes.
First choose a random number (num_people) between 10 and 50. This will be
the number of people for whom you generate ages. Print it out.
Next, randomly create ages ranging from 0 to 120 for each of the (num_people)
people. Print these out as you generate them.
At the end, print out the TOTAL ages as well as the INTEGER average of the
Also, print out
the number of people who are not old enough to be teenagers
the number of teenagers
the number of people in their twenties
the number of people who are ages 30 - 65 inclusive
and, finally, the number of people over 65
Make certain that your program is well commented!!!
Do NOT wait until you have finished coding to add comments - do them as you
code the program.
Also make certain that your name and social security number are at the
When you are done and have tested it, email your source file to your E-Tutor