Blood sugar is considered normal if its rate is Ines than 140 and greater than 70 , it is considered high its rate is greater man or equal to 140 , and it is considered low its rate is less than or equal to 70 . Write a program that read form a file called " patient.txt " the data for unknown number of patients , each line in the file contain : First and the last name of the patient Age The rate of the blood sugar . Print on Screen the following : • The data of each patient ( in one line ) in addition to the string " Height " , " Low " or " Normal " depending of the rate . • The number of patients with normal blood sugar . The number of patients with high blood sugar . • The number of patients with low blood sugar . The total number of patients in the file .

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question
‏Blood sugar is considered normal if its rate is Ines than 140 and greater than 70 , it is considered high its rate is greater man or equal to 140 , and it is considered low its rate is less than or equal to 70 . Write a program that read form a file called " patient.txt " the data for unknown number of patients , each line in the file contain : First and the last name of the patient Age The rate of the blood sugar . Print on Screen the following : • The data of each patient ( in one line ) in addition to the string " Height " , " Low " or " Normal " depending of the rate . • The number of patients with normal blood sugar . The number of patients with high blood sugar . • The number of patients with low blood sugar . The total number of patients in the file .
Blood sugar is considered normal if its rate is less than 140 and greater
than 70, it is considered high its rate is greater a or equal to 140, and it
is considered low its rate is less than or equal to 70.
Write a program that read form a file called "patient.txt" the data for
unknown number of patients, each line in the file contain:
• First and the last name of the patient
• Age
• The rate of the blood sugar.
Print on Screen the following:
• The data of each patient (in one line) in addition to the string "Height",
"Low" or "Normal" depending of the rate.
• The number of patients with normal blood
• The number of patients with high blood sugar.
• The number of patients with low blood sugar.
The total number of patients in the file.
sugar.
Transcribed Image Text:Blood sugar is considered normal if its rate is less than 140 and greater than 70, it is considered high its rate is greater a or equal to 140, and it is considered low its rate is less than or equal to 70. Write a program that read form a file called "patient.txt" the data for unknown number of patients, each line in the file contain: • First and the last name of the patient • Age • The rate of the blood sugar. Print on Screen the following: • The data of each patient (in one line) in addition to the string "Height", "Low" or "Normal" depending of the rate. • The number of patients with normal blood • The number of patients with high blood sugar. • The number of patients with low blood sugar. The total number of patients in the file. sugar.
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
File Input and Output Operations
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++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT