I'm doing a simple C program to calculate body mass index. However, it is returning a different (wrong) value than a regular calculator.
#include <stdio.h>
int main() {
float height, weight, imc;
printf("Hello World!\nWhat's your height?");
scanf("%f", &height);
printf("What's your weight?");
scanf("%f", &weight);
imc = height / (weight * height);
printf("%f", imc);
getch();
return 0;
}
Expression: Height / weight²