Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please write the program in C LANGUAGE. Morover, implement the use of \"struct.\

ID: 3733963 • Letter: P

Question

Please write the program in C LANGUAGE. Morover, implement the use of "struct." Finally, please provide comments and documentation to aid in understanding of why you did what you did. Thank you so much!

Description Create a C program that reads simulated patient health information from standard input, performs a bit of analysis on that data and outputs a summary of the information. You must write a software program to prompt the user for two different types of patient health information: patient vital information and patient activity information. The patient vital information consists of three pieces of information float temperature; unsigned int systolicPressure; unsigned int diastolicPressure; You should represent the patient vital information as a structure with these three members The patient activity information consists of two pieces of information: unsigned int stepCount; unsigned int sleepHours; You should represent the patient activity information as a structure with these two members To simulate the memory efficiency requirements of a health device, you should use an abstract data type to hold either patient vital information or patient activity information in a memory efficient manner. Operation When the program starts, ask the user if they wish to: 1Enter some patient vital information 2- Enter some patient activity information 3 - Print summary information on the patient information and exit the progranm If the user wishes to enter some patient vital information, you should prompt for the three pieces of information and store that information in an array for later processing

Explanation / Answer

#include<stdio.h>

#include<conio.h>

struct p_vital_info

{

float temperature;

int systolic_pressure;

int diastolic_pressure;

};

struct p_activity_info

{

int step_count;

int sleep_hours;

};

void main()

{

struct p_vital_info pv[50];

struct p_activity_info pa[50];

int choice,no,i;

clrscr();

printf("Please enter the number for the desired action (1,2,3): ");

scanf("%d",&choice);

if(choice==1)

{

printf("Enter total number of records to insert ");

scanf("%d",&no);

for(i=0;i<no;i++)

{

printf("Enter the temperature: ");

scanf("%f",&pv[i].temperature);

printf("Enter the systolic pressure: ");

scanf("%d",&pv[i].systolic_pressure);

printf("Enter the diastolic pressure: ");

scanf("%d",&pv[i].diastolic_pressure);

}

}

else if(choice==2)

{

printf("Enter total number of records to insert ");

scanf("%d",&no);

for(i=0;i<no;i++)

{

printf("Enter the temperature: ");

scanf("%f",&pa[i].sleep_hours);

printf("Enter the systolic pressure: ");

scanf("%d",&pa[i].step_count);

}

}

printf("total number of records are ");

for(i=0;i<no;i++)

{

printf("the temperature is %f ",pv[i].temperature);

printf("the systolic pressure is %d ",pv[i].systolic_pressure);

printf("Enter the diastolic pressure is %d ",pv[i].diastolic_pressure);

}

getch();

}