Complete the following program When a machine reads blood pressure from a human body it displays two numbers they are called Systolic and Diastolic pressures. The program will take systolic and diastolic reading as input from the user and displays a message whether the person's plood pressure is "Normal" or "Elevated" or "High Blood Pressure". Program consists of two functions as follows. rold input(. .).This function is with two pass by reference parameters, and it reads input from the user. itring process(.): It receives two numbers(systolic and diastolic) and then it determines and returns a category Iccording to the table below. Category Normal Systolic 80 to 120 120 to 139 High blood equal and above 140 Diastolic and 60 to 80 and 80 to 90 Elevated pressure above 90 or main () program is given below and you are asked to write the function definitions in the space provided below #include #include using namespace std; void input(int & int &); string process(int, int); int main() int systolic, diastolic; input(systolic, diastolic); // input) called to read input cout<

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section4.3: Nested If Statements
Problem 7E
icon
Related questions
Question
Complete the following program
When a machine reads blood pressure from a human body it displays two numbers they are called Systolic and Diastolic
pressures.
The program will take systolic and diastolic reading as input from the user and displays a message whether the person's
plood pressure is "Normal" or "Elevated" or "High Blood Pressure".
Program consists of two functions as follows.
vold input( .):This function is with two pass by reference parameters, and it reads input from the user.
itring process.): It receives two numbers(systolic and diastolic) and then it determines and returns a category
Iccording to the table below.
Systolic
80 to 120
Diastolic
and 60 to 80
80 to 90
Category
Normal
Elevated
120 to 139
and
equal and
above 140
High blood
pressure
above 90
or
main () program is given below and you are asked to write the function definitions in the space provided below.
#include<iostream>
#include<string>
using namespace std;
void input(int &, int &);
string process(int, int):
int main()
int systolic, diastolic;
input(systolic, diastolic); // input() called to read input
cout<<process(systolic, diastolic)<<endl; l/process() called
// end of main function
Sample Output:
CWindowaystem32emdese
Please enter systolic reading : 113
Please enter diastolic reading : 79
Normal
Press any key to continue .
Transcribed Image Text:Complete the following program When a machine reads blood pressure from a human body it displays two numbers they are called Systolic and Diastolic pressures. The program will take systolic and diastolic reading as input from the user and displays a message whether the person's plood pressure is "Normal" or "Elevated" or "High Blood Pressure". Program consists of two functions as follows. vold input( .):This function is with two pass by reference parameters, and it reads input from the user. itring process.): It receives two numbers(systolic and diastolic) and then it determines and returns a category Iccording to the table below. Systolic 80 to 120 Diastolic and 60 to 80 80 to 90 Category Normal Elevated 120 to 139 and equal and above 140 High blood pressure above 90 or main () program is given below and you are asked to write the function definitions in the space provided below. #include<iostream> #include<string> using namespace std; void input(int &, int &); string process(int, int): int main() int systolic, diastolic; input(systolic, diastolic); // input() called to read input cout<<process(systolic, diastolic)<<endl; l/process() called // end of main function Sample Output: CWindowaystem32emdese Please enter systolic reading : 113 Please enter diastolic reading : 79 Normal Press any key to continue .
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Types of Function
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning