Health programing

im in need of an assistantance right now i am Trying to program but i don't seem to succeed please tell me what error or what should i do next

// Project in Computer (3rd Grading)
// Submitted to:
/* Himiko,
uke */

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#define maximum 999999
#define minimum 999999

int main ()
{

int age;
char sname[50],fname[50],mname[50],height[50],weight[50],bltemp[50],pulse[50];

{
system("cls");
printf("\n\n ");
printf("\t\t\t\********************************************");
printf("\n\t\t\tI I");
printf("\n\t\t\tI Saint Gabriel Hospital I");
printf("\n\t\t\tI I");
printf("\n\t\t\tI Patient Records Automatic System I");
printf("\n\t\t\tI I");
printf("\t\t\t\********************************************");
printf("\n\n\n\tPlease fill-up the patient's infomartion");
printf("\n\n\n\tPlease enter your first name: ");
scanf("%s",&fname)
printf("\tPlease enter your middle name: ");
scanf("%s",&mname)
printf("\tPlease enter your surname name: ");
scanf("%s",&sname)
printf("\tPlease enter your age: ");
scanf("%d",&age)
printf("\tPlease enter your height: ");
scanf("%s",&height)
printf("\tPlease enter your weight: ");
scanf("%s",&weight)
printf("\tPlease enter your blood temperature: ");
scanf("%s",&bldtemp)
printf("\tPlease enter your pulse rate: ");
scanf("%s",&pulse)
}

}
Last edited on
1
2
#define maximum 999999
#define minimum 999999 


Anything odd about that?

Anyway, you're using the scanf function incorrectly. Remove the & .


Also, this is C code. You're writing C code. Did you meant to write C++?
i can't seem to solve the odd of #Define maximum 999999 i don't seem to know how
please tell me on how to use the Scanf function you mention if im wrong
1
2
#define maximum 999999
#define minimum 999999  


What is this for? What are you using it for?

Do not edit your code in the original post. This thread now makes no sense because you changed the code, so what I said about scanf no makes no sense because you changed the code. Do not change the code in your original post.


scanf("%d",age)
age is NOT an array, so you need & .

If you were using C++, this would be much easier for you :/
Last edited on
I'm Sorry! i fix it back to its original post
I'm using this programming for my project in computer
To summarise; to make your original code better, ensure you're using scanf correctly. & only when you are not writing into an array.

Also, when you have troubles with your code, you should tell us the error message, or tell us what the problem is - what the code does that you don't like, or what it does not do that you wish it did. Just presenting code isn't enough.
Last edited on
1
2
#define maximum 999999
#define minimum 999999 

Since you don't use them you can remove them.
Shouldn't weight, height, bltemp,pulse ne numbers.
Registered users can post here. Sign in or register to post.