Hi there ! Actually I am a beginner in c++ and i have a problem to convert pseudocode to c++. Hope that anyone can help me
Input : number of people, height of persons
Process: division, addition, comparison (greater than and smaller than)
Output : smallest height,
tallest height,
number of people,
average height
Algorithm : Pseudocode
Begin
Initialize counter to one
Initialize sum to zero
Prompt “Enter number of people”
Read numOfPeople
Prompt “Enter height in meter: “
Read height
Assign height to smallest
Assign height to tallest
While counter less than numOfPeople do
Prompt “Enter height in meter: “
Read height
Add height to sum and assign the result to sum
Increase counter by one
If height less than smallest then
Assign height to smallest
If height greater than tallest then
Assign height to tallest
Divide sum by numOfPeople and assign the result to average
Display numOfPeople value, average value, tallest value and smallest value
End