hi all..im new to this forum. I read Absolute Beginners Guide to C published in 1993 by Sams Publishing these past two weeks and I have just ordered K&R. I figured i'd post my first post (created an account on this forum a few days ago). Im going to stick with learning C until I master it.
I'm compiling on mac os x 10.6.8 inside Console/X11 using gcc, says gcc version 4.2.1 (I'm aware its old).
I have read about data types and I know they aren't correct and I don't think the expression is right.
Code:
/* bmi.c */
#include <stdio.h>
main()
{
float bmi;
float height;
int weight;
printf("Enter weight:\n ");
scanf("%d", &weight);
printf("Enter height in inches:\n ");
scanf("%f", &height);
bmi = weight * 703 / (height)2; */
printf("\nYour BMI is %f", &bmi);
return 0;
}