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)
}
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
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 :/
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.