Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This question covers materials in Seminar 1,2 and 3. Use selection and loop structures for this question. Functions, or collections are not required for this
This question covers materials in Seminar 1,2 and 3. Use selection and loop structures for this question. Functions, or collections are not required for this question. According to the National Population Health Survey, over one in three (35.5%) Singapore residents aged 18 to 74 years had hypertension (or high blood pressure) during the period 20192020. It is one of the major risk factors for coronary artery disease and stroke. Blood pressure (BP) readings are expressed as a ratio of the systolic pressure (the first number or numerator), over the diastolic pressure (the second number or denominator). Table 1 showcase the guidelines used by American Heart Association to determine the different blood pressure categories. (a) Write a program that helps a user find out their blood pressure category. The program reads in two integer numbers, one number on top (systolic) and one on the bottom (diastolic), like a fraction. For example, 120/80 (representing 120/80 mmHg). Assume user will enter valid input. Sample program executions are as follows: Sample run 1 Enter blood pressure readings (mmHg):110/70 Your blood pressure is normal. Sample run 2 Enter blood pressure readings (mmHg):128/85 You have Stage 1 Hypertension. Sample run 3 Enter blood pressure readings (mmHg):120/90 You have Stage 2 Hypertension. (10 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started