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<

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
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; //process() called
// end of main function
Sample Output:
CWindowstaystem32iemdexe
Please enter systolic reading : 113
Please enter diastolic reading : 79
Normal
Press any key to continue.
Transcribed Image Text: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; //process() called // end of main function Sample Output: CWindowstaystem32iemdexe Please enter systolic reading : 113 Please enter diastolic reading : 79 Normal Press any key to continue.
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
blood 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.
string process( .): It receives two numbers(systolic and diastolic) and then it determines and returns a category
according to the table below.
Diastolic
and 60 to 80
and 80 to 90
Category
Systolic
Normal
80 to 120
Elevated
120 to 139
High blood equal and
pressure
above 140
above 90
or
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 blood 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. string process( .): It receives two numbers(systolic and diastolic) and then it determines and returns a category according to the table below. Diastolic and 60 to 80 and 80 to 90 Category Systolic Normal 80 to 120 Elevated 120 to 139 High blood equal and pressure above 140 above 90 or
Expert Solution
steps

Step by step

Solved in 4 steps with 1 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