When a digital machine reads blood pressure from a human body it displays two numbers they are called Systolic and Diastolic pressures. Following table shows the range of normal, elevated and high blood pressure category. Category Normal Elevated Systolic 80 to 120 Diastolic and 60 to 80 120 to 139 High blood equal and above 140 and 80 to 90 pressure | above 90 or A text file BP.txt contains unknown number of patients Id, systolic and diastolic pressures respectively as shown below. Note: - Please download the file BP.txt from moodle in order to run and test your program. 135 110 150 85 85 95 85 115 137 85 110 95 Pa5 Sq2 120 Tx2 Pa6 Sq3 On2 Tx3 88 78 135 85 150

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

C++

C++

When a digital machine reads blood pressure from a human body it displays two numbers they are called
Systolic and Diastolic pressures. Following table shows the range of normal, elevated and high blood pressure
category.
Category
Systolic
80 to 120
Diastolic
Normal
and 60 to 80
Elevated
High blood equal and
and 80 to 90
120 to 139
above 140
above 90
pressure
or
A text file BP.txt contains unknown number of patients Id, systolic and diastolic pressures respectively as
shown below.
Note: - Please download the file BP.txt from moodle in order to run and test your program.
Npad
e a famar Vie
135
110
150
120
88
78
135
85
150
Tx1
Pa5
Sq2
85
85
95
85
115
137
85
Tx2
Pa6
Sq3
Qs2
Tx3
110
95
Transcribed Image Text:When a digital machine reads blood pressure from a human body it displays two numbers they are called Systolic and Diastolic pressures. Following table shows the range of normal, elevated and high blood pressure category. Category Systolic 80 to 120 Diastolic Normal and 60 to 80 Elevated High blood equal and and 80 to 90 120 to 139 above 140 above 90 pressure or A text file BP.txt contains unknown number of patients Id, systolic and diastolic pressures respectively as shown below. Note: - Please download the file BP.txt from moodle in order to run and test your program. Npad e a famar Vie 135 110 150 120 88 78 135 85 150 Tx1 Pa5 Sq2 85 85 95 85 115 137 85 Tx2 Pa6 Sq3 Qs2 Tx3 110 95
Write a program that reads patients id, systolic and diastolic as input from the file and then display the list of
only "Normal" and "Elevated" patients as shown in the sample output.
Program consists of two functions as follows.
Print (.):. This function prints the record for only category "Normal" and "Elevated" as shown in the
sample output.
PressureType (..): It receives two integers (systolic and diastolic) and then it determines and returns a
category according to the table above.
Sample Output:
Blood Pressure Report
Patient Id
Diastolic
Systolic
Category
Elevated
Normal
Elevated
Tx1
Pss
os1
Tx2
Ps6
Sq3
Ps7
Os3
Ps8
Sqs
Press anv kev to continue
85
75
135
110
120
85
Normal
Normal
Elevated
Elevated
88
85
70
70
135
85
125
133
135
82
87
Elevated
Elevated
85
85
79
Normal
Transcribed Image Text:Write a program that reads patients id, systolic and diastolic as input from the file and then display the list of only "Normal" and "Elevated" patients as shown in the sample output. Program consists of two functions as follows. Print (.):. This function prints the record for only category "Normal" and "Elevated" as shown in the sample output. PressureType (..): It receives two integers (systolic and diastolic) and then it determines and returns a category according to the table above. Sample Output: Blood Pressure Report Patient Id Diastolic Systolic Category Elevated Normal Elevated Tx1 Pss os1 Tx2 Ps6 Sq3 Ps7 Os3 Ps8 Sqs Press anv kev to continue 85 75 135 110 120 85 Normal Normal Elevated Elevated 88 85 70 70 135 85 125 133 135 82 87 Elevated Elevated 85 85 79 Normal
Expert Solution
steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY