I am supposed to write a program that maintains health records such as body weight, age, and so on. I have already have the figures in and was just wondering how would I display them with printf & scanf. For example.
Code:
int computeAge(hp record);
/* Purpose: This function computes the patients maximum heart rate Inputs: An integer that represents the patients age in years Outputs: An integer that represents the patients maximum heart rate*/
This is what I have so far.
Code:
#include <stdio.h>struct DOB
{
int month;
int day;
int year;
};
typedef DOB dob;
struct healthprofile hp;
{
char * lName;
char * fName;
char gender;
dob birthDate;
dob todaysdate;
double height;
double weight;
};
typedef struct healthProfile hp;
void getprofileData(hp record);
int computerAge(hp record);
int computerMaxHR(int age);
int computerTargetHR(int mhr);
double computeBMI(hp record);
void displayProfileData(hp record);
void displayProfileStats(int age, int mhr, int thr, double b);
int main()
{
int yearAge;
int maxHR;
int targetHR;
double bmi;
hp aProfile;
return 0;
}
void getProfileData(hp record)
{
}
int computeAge(hp record)
{
return 0;
}
I hope to get some advice on how I would complete this code.