Created
August 7, 2024 15:39
-
-
Save 9M2PJU/eee04c708a440dbd4d17b10dac396774 to your computer and use it in GitHub Desktop.
Simple BMI Calculator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
int main() | |
{ | |
float a,b,c; | |
float BMI; | |
printf("Please enter your weight:"); | |
scanf("%f",&a); | |
printf("Please enter your height:"); | |
scanf("%f",&b); | |
c=pow(b,2); // it need math.h to work | |
BMI=a/c; | |
printf("Your BMI is %f!",BMI); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment