So I am fairly new to coding in general and one of my assignments was to make a working BMI calculator. I don't get any errors but when i run the program my bin.exe crashes every time I type a number in when asked "What is your height in inches". Does anyone know why this would happen or see an error in my code which I will put below? Thanks
Code:
/* My Name
* 8.29.14
* To calculate the BMI of the user
*/
//included libraries
#include <stdio.h>
#include <math.h>
//main function
int main() {
//Variables
float height,weight,BMI;
//Ask user for data
printf("What is your height in inches?\n", height);
scanf("%d, &height");
printf("What is your weight in pounds?\n", weight);
scanf("%d, &weight");
//bmi equation
BMI = (weight * 703) / (height * height);
printf("Your BMI is %.2f\n, BMI");
return 0;
}