ok so i just started a cs5 class
and im am completely lost
can someone please help me figure out this problem

The figure below shows the data file for the blood pressures for the patients
| 4538 120 150 200 149 -10|
| 1278 100 170 165 -5 |
| 9823 99 118 186 90 -8 |
| . . . . -7 |
| . . . . -8 |
| . . . . -6 |

The first column shows the patient ID numver. All positive values after that are blood pressure readings. The blood pressure data for each patient is terminated by a negative value. Write the pseudo code and draw a flow chart for a computer program using nested loops, which would do the following

-Print a header like the one below
Patient ID Average Blood Presure

-Processes the data file and prints for each patient, th ID number and the average blood
pressure/ For example for the first patient it will print.
4538 154.75

(Hints: the outer loop would be EOF controlled. The inner loop will be trailer logic or sentinel controlled.)

9 Years
Discussion Span
Last Post by straighttriipn

I don't see why you would need any help for this. The reason is that I can't read your mind. Unless you can explain what you don't understand how to do, you won't be able to get aid with this problem. And if you can figure out what you don't understand, you can solve this conundrum on your own.


Like this

open file
read patient record
process patient record
if endof file reached break
else continue

thankyou for your help.
as u can see im not really good at this
and i kno i need help so thankyou for helping

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.