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: - healthy red blood cell: 35 to 50 (inclusive) - anemic red blood cell: 0 to less than 35 Example:

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.4: A Case Study: Rectangular To Polar Coordinate Conversion
Problem 2E: (Practice) Write a C++ program that accepts the rectangular coordinates of two points...
icon
Related questions
Question

Problem 30 - Arrays

C++ program pls

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:
- healthy red blood cell: 35 to 50 (inclusive)
- anemic red blood cell: 0 to less than 35
Example:
Transcribed Image Text: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: - healthy red blood cell: 35 to 50 (inclusive) - anemic red blood cell: 0 to less than 35 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
Your output should look like:
The average blood cell count was 36.8857
The distribution of the red blood cell counts was:
healthy: ****
anemic:
***
Transcribed Image Text:Suppose the user enters the following red blood cell counts: 24.5, 36.8, 25.66, 44.12, 48.0, 45.22, 33.9 Your output should look like: The average blood cell count was 36.8857 The distribution of the red blood cell counts was: healthy: **** anemic: ***
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr