Need Help
So I am trying to print the height and weight within the main() function and also my floating number isn't coming out to decimal values; here is my code.. #include <stdio.h> int getHeight() { int height; printf("enter the height:"); scanf("%d", &height); return height; } //getHeight() double getWeight() { double weight; printf("enter the weight:"); scanf("%f", &weight); return weight; } float calculateBMI(int height, double weight) { float bmi = ((weight) / (height * height * height)); printf("Your BMI value is %d. \n", bmi); } void printBMI(float bmi) { if (bmi < 18.5) { printf("You are Underweight.\n"); } if (bmi >= 18.5 && bmi <= 24.9) { printf("You are Normal.\n"); } if (bmi >= 25 && bmi <= 29.9) { printf("You are Overweight.\n"); } if (bmi >= 30) { printf("You are Obese.\n"); } return 0; } int main() { int height; height = getHeight(); printf("height is", height); double weight; weight = getWeight(); float bmi = 0; bmi = calculateBMI(height, weight); printBMI(bmi); }