+ 1
How do i write a code for calculating bmi? Someone please help me. BMI=weight/(height*height). Weight in kg and height in cm.
Am new to programming and doing C
2 ответов
+ 7
#include<stdio.h>
int main()
{
int height;
float w8, bmi;
printf("enter the HEIGHT in cm\n");
scanf("%d",&height);
printf("enter the WEIGHT in Kg\n");
scanf("%f",&w8);
bmi=w8/(height*height);
printf("BMI is ℅f", bmi);
return 0;
}
+ 1
Bro tks alot really appreciate it