Hi. I have just learnt C programming and I don;t know what's wrong with the printf("Your BMI is %0.2f.\n", BMI);below. Is there anyone can check it for me please?
Code:/* Demonstates variables and constants*/ #include <stdio.h> /*Declare the need variable*/ float BMI; int height_in_meters, weight_in_killograms; int main() { /* Input data from user*/ printf("How tall are you in meters:"); scanf("d%", &height_in_meters); printf("Please enter your weight in killograms:"); scanf("d%", &weight_in_killograms); /* Perform conversions*/ BMI = (weight_in_killograms)/(height_in_meters)^2 /* Display result on the screen*/ printf("Your BMI is %0.2f.\n", BMI); return 0; }