BMI Calculator if statement help

I am wanting to write a program for a BMI calculator that eventually will record details for several entries.

However to start with I need to be able to just complete one calculation.

Below is my code which works up to the if statement what I am trying to do is once I have completed the calculation be able to take that result and use the if statement to indicate if the result is normal, under or over.

I don't know how to take the result and put it into the if statement.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  #include <stdio.h>
#include <math.h>
int main()
{
    
   float height, weight,bmi;
  
 
   printf("Enter Weight in Kg's and Height in METERS  \n");
   scanf("%f%f", &weight, &height );

   bmi = weight/(height*2);
 

   printf("Your BMI is %.2f\n",bmi);
   
   scanf("%");
   
  if("%f"<=25){
                printf("your weight is normal\n");
}
      
 
return(0);
Topic archived. No new replies allowed.