Summer 2002


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 ages.

Also, print out

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 top.

When you are done and have tested it, email your source file to your E-Tutor at v002su1@cs.nyu.edu