### Calculator Averages/How hard?

I am interested in creating a calculator that totals a group of ages and
from that average determines how much of a risk that group is
for certain diseases such as diabetes, heart disease, etc.

I would like the program to read as:
Would you like to add another age? Y/N
"Y"
Would you like to add another age? Y/N
"N"
The average age is "__"
According to the median age of this group. Your risk for the following
diseases are:
Heart disease:
Diabetes:

I completed a basic college C++ course two years ago. I barely remember it. However, I am writing a college essay (English course) that I feel would really benefit by adding this at the end of the report.

My next question is how do i get this onto a cheap hosting site to provide
to my professor along with my research paper?

Thank you everyone!
A.

pretty easy. shove the ages into a container, add them up, divide by the number of them... lookup table / interpolation table against risks, done.
median isn't average. Its the middle value, eg 0, 2, 100, the median is 3. the average is 34. c++ code is compiled, it gives an executable program, you can hand it to him directly and he can run it on his machine.
Last edited on
Jonnin, I think you have a typo. For values 0, 2, 100, the median is 2, not 3.
yep. fumble fingered that.