Question

In: Computer Science

Using (C programming language) Create a health monitoring program, that will ask user for their name,...

Using (C programming language)

Create a health monitoring program, that will ask user for their name, age, gender, weight, height and other health related questions like blood pressure and etc.

Based on the provided information, program will tell user BMI, blood pressure numbers if they fall in healthy range or not and etc.

Suggestions can be made as what should be calorie intake per day and the amount of exercise based on user input data. User should be able to insert height either in cm or inches and weight can be either in kgs or lbs.

Some information on Blood pressure:

Elevated blood pressure: Diastolic < 80 and Systolic between 120 and 129

Stage 1 Hypertension: Diastolic between 80 and 89, or Systolic between 130 and 139

Stage 2 Hypertension: Diastolic 90 or greater, Systolic 140 or greater

Danger Zone: Stage 2 Hypertension, but Diastolic 120 or greater, or Systolic 180 or greater

Hypotension: Diastolic 60 or lower, Systolic 90 or lower

Other quantities can be:

Pulse, body temperature

Solutions

Expert Solution

Health Monitoring Program using C

The given below program is a health monitoring program through which the user can enter the health coditions and other details and based on that, the system will provide suggestions and remarks and also it will tell the current health state of the user and , if or not he requires immediate health care.

In this program, we will ask the user to enter all their details and health related details, Then the system stors the details and checks for various diseases and other stuff.

Given Below is the code :

#include<iostream.h>

void main() //main function.Execution starts

{

char name,gender;   //Declearing the required varibles

int age,weight,height,a,pulse;

printf("Enter the name of the patient");   //Getting the details of the patient.

scanf("%s",&name);

printf("enter the age of the patient");

scanf("%d",&age);

printf("enter the Gender of the patient");

scanf("%s",&gender);

printf("Enter the height in centemeters");

scanf("%d",&height);

printf("enter the weight");

scanf("%d",&weight);

printf("The Details of %s are :",name);   //Displaying the details to the patient/

printf("Age : %d",age);

printf("Gender :%s",gender);

printf("Height :%d",height);

printf("Weight :%d",weight);

printf("Enter The Blood pressure details"); //Getting the blood pressure details.

printf("Enter the diastolic value");   //getting diastotic value

scanf("%d",&diastolic);

printf('enter the systolic value");   getting the systolic value

scanf("%d",&systolic);

if((diastolic<80)&&((systolic>120)&&(systolic<129))) //Checking for elivated BP condition.

{

printf("Having Elivated Blood Pressure");

}
else if((diastolic>80)&&(diastolic>89) && ((systolic>130)&&(systolic<139)))

{   //Checking for Hypertension Condition.

printf("Stage 1 Hypertension");

else if (diastolic>90&&systolic>140)

{

printf("Stage 2 HyperYension");

}

else

{

printf("the patient is in danger zone and admit to a hospital Immediately");

}

Printf("Calorie Intake"); // Food control.

a=height-100;

if(a>weight) //Checking whether height - 100 is the weight

{

printf("you are overweight")

Printf("Your Calorie intake should be 800-1200K"); //Displaying calorie intake

}

else

{

printf("you are balenced");

printf("Calorie Intake can be 1500-2000k");

}

printf("enter the Pulse rate"); //Checking the pulse rate

scanf("%d",&pulse);

if((pulse>60)&&(pulse<90)) //Checking whether rate between normal boundaries

{

printf("pulse rate normal");

}

else

{

printf("Pulse rate high");

}

}

Note : Read the inline comments and understand the program.Thank You.


Related Solutions

Write a program using C language that -ask the user to enter their name or any...
Write a program using C language that -ask the user to enter their name or any other string (must be able to handle multiple word strings) - capture the epoch time in seconds and the corresponding nanoseconds - ask the user to type in again what they entered previously - capture the epoch time in seconds and the corresponding nanoseconds -perform the appropriate mathematical calculations to see how long it took in seconds and nanoseconds (should show to 9 decimal...
Create a basic program (C programming language) that accomplishes the following requirements: Allows the user to...
Create a basic program (C programming language) that accomplishes the following requirements: Allows the user to input 2 numbers, a starting number x and ending number y Implements a while loop that counts from x (start) to y(end). Inside the loop, print to the screen the current number Print rather the current number is even or odd If the number is even , multiply by the number by 3 and print the results to the screen. If the number is...
Create a small program that contains the following. ask the user to input their name ask...
Create a small program that contains the following. ask the user to input their name ask the user to input three numbers check if their first number is between their second and third numbers
Using C# programming language, Write a program that sort three numbers entered by the user using...
Using C# programming language, Write a program that sort three numbers entered by the user using only if and nested if statements. If for instance the user entered 5, 2, and 7; the program should display 2,5,7.
C# Programming Language Write a C# program ( Console or GUI ) that prompts the user...
C# Programming Language Write a C# program ( Console or GUI ) that prompts the user to enter the three examinations ( test 1, test 2, and test 3), homework, and final project grades then calculate and display the overall grade along with a message, using the selection structure (if/else). The message is based on the following criteria: “Excellent” if the overall grade is 90 or more. “Good” if the overall grade is between 80 and 90 ( not including...
Using c# programming language Write a program that mimics a lottery game. Have the user enter...
Using c# programming language Write a program that mimics a lottery game. Have the user enter 3 distinct numbers between 1 and 10 and match them with 3 distinct, randomly generated numbers between 1 and 10. If all the numbers match, then the user will earn $10, if 2 matches are recorded then the user will win $3, else the user will lose $5. Keep tab of the user earnings for, let say 5 rounds. The user will start with...
using C language Create a bitwise calculator that ask user for input two input, first int,...
using C language Create a bitwise calculator that ask user for input two input, first int, bitwise operation, second int (i.e 5 & 9) only those bitwise operation are allowed: & ~ ^ | << >>. If user uses wrong operators stop program and ask again. Convert the first int and second int into 8 BITS binary (00000000) and use bitwise operator given by user to either AND, OR, XOR, etc (ie 1001 & 1111)
c++ In this program ask the user what name they prefer for their file, and make...
c++ In this program ask the user what name they prefer for their file, and make a file, the file name should za file. Get a number from the user and save it into the create file. should be more than 20 number in any order. print out all 20 numbers in a sorted array by using for loop, last print out its total and average. At last create a function in which you will call it from main and...
Create a C++ program that will ask the user for how many test scores will be...
Create a C++ program that will ask the user for how many test scores will be entered. Setup a while loop with this loop iteration parameter. (no fstream) The data needs to include the student’s first name, student number test score the fields should be displayed with a total width of 15. The prompt should be printed with a header in the file explaining what each is: ex. First Name student number Test Score 1) mike 6456464   98 2) phill...
Create a program (Python) YourFirstnameLastnameA06b.py to ask the user to create a password: The user will...
Create a program (Python) YourFirstnameLastnameA06b.py to ask the user to create a password: The user will first enter a password, then enters the same password again; If the second input is the same as first one, the user successfully creates the password. Print “Well done.”; Otherwise, the user will be directed to repeat the whole process (go to step 1.)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT