Blood Cell Histogram

Write a C++ program that takes as input an arbitrary number of red blood cell counts in the range 0 to 50 and does two things:

  1. computes and prints the average red blood cell count
  2. prints out a simple histogram of the red blood cell counts using the following categories:
Assume the user ends the list of blood cell counts with a value that is out of range (that is, below 0 or above 50). .

Example: Suppose the user enters the following red blood cell counts:

24.5, 36.8, 25.66, 44.12,48.0, 45.22, 33.9 -1
Your output should loook like:
The average blood cell count was 36.8857

The distribution of the red blood cell counts was: 

healthy: ****
anemic: ***

Design you program so that it uses (at least a) function.