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...
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.
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
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...
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...
Language C++ Ask the user to enter the name of one primary color (red, blue, yellow)...
Language C++ Ask the user to enter the name of one primary color (red, blue, yellow) and a second primary color that is different from the first. Based on the user's entries, figure out what new color will be made when mixing those two colors. Use the following guide: red and blue make purple blue and yellow make green yellow and red make orange If the user enters anything that is outside one of the above combinations, return an error...
Language: C# Create a new Console Application. Your Application should ask the user to enter their...
Language: C# Create a new Console Application. Your Application should ask the user to enter their name and their salary. Your application should calculate how much they have to pay in taxes each year and output each amount as well as their net salary (the amount they bring home after taxes are paid!). The only taxes that we will consider for this Application are Federal and FICA. Your Application needs to validate all numeric input that is entered to make...
You are using ONLY Programming Language C for this: In this program you will calculate the...
You are using ONLY Programming Language C for this: In this program you will calculate the average of x students’ grades (grades will be stored in an array). Here are some guidelines to follow to help you out: 1. In your program, be sure to ask the user for the number of students that are in the class. The number will help in declaring your array. 2. Use the function to scan the grades of the array. To say another...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT