#include<stdio.h>;
void main()
{
float w,h,bmi;
printf("Enter weight in kgs and height in meters");
scanf("%f%f",&w,&h);
bmi=w/(h*h);
printf("bmi: %f",bmi);
bmi<18.5?printf("Underweight"):(bmi<25)?printf("Normal weight"):(bmi<30)?printf("Overweight"):printf("Obesity");
}
Calculate your BMI here
| Weight (in kg): | |
| Height (in meters): | |
Related Posts:
C Program to Display Prime Numbers Less than Given NumberC Program to Display Armstrong Numbers
C Program to Check Armstrong Number
C Program to Reverse a Number
C Program for Quick Sort
C Program to Search an element in array (Linear Search)
Leap Year C Program
C Program to Find Sum of Digits of a Number
C Program to Check Perfect Number
C Program to Find Transpose of Matrix
C Program to Understand Bitwise Operators
No comments:
Post a Comment