Could someone please look at this and tell me why it won't run?
This is what it's supposed to do.
char id ;
struct patient a;
for (i=0; i<=3; i++)
printf("Please enter patient ID number \n");
scanf("\n"); /*Clears memory buffer*/
printf("Please enter systolic blood pressure \n");
scanf ("%d", a[i].systolic);
printf("Please enter diastolic blood pressure \n");
scanf ("%d", a[i].diastolic);
printf ("Please enter ldl cholesterol \n");
scanf ("%d", a[i].ldl);
printf ("Please enter hdl cholesterol \n");
scanf ("%d", a[i].hdl);
for(x=0; x<=3; x++)
You will define a patient structure for a patient checkup. The patient will have an id (letters and numbers), systolic blood pressure, diastolic blood pressure, ldl cholesterol, and hdl cholesterol. Check the input for the proper field types and sizes.
In main, you will declare an array of 4 patients. You will be using a for loop to fill up the array of patients. Again, check input format. The user will be prompted and will input each of the fields.
After a few new lines, you will print out the list of patients. At the top of the output, print a centered title Patient's Report, a blank line, and the column headings – Patient ID, Blood Pressure, and Cholesterol Ratio. Then with another for loop, print the patient id field, the blood pressure - systolic/diastolic (with the slash), and cholesterol ratio (ldl divided by hdl) with 2 decimal places. Make sure they print centered under the column headings by using field widths, precisions, alignments, etc.