/*
Lauren Dukes
CPSC 1110 Example

Calculates BMI and tells you your weight category using the following algorithm:

1. Get user's height in inches
2. Get user's weight in pounds
3. Calculate BMI using the formula: BMI = (weight in pounds / (height in inches * height in inches)) * 703
4. Display the user's BMI
5. Decide which category the BMI falls into and display it
	a. If the BMI is less than 18.5, tell the user they are underweight
	b. If the BMI is between 18.524.9, tell the user they are a healthy weight
	c. If the BMI is above 24.9, tell the user they are overweight
*/

#include <stdio.h>
int main(void){
	float height = 0;
	float weight = 0;
	printf("Please enter your height in inches.");
	scanf("%f",&height);
	printf("Please enter your weight in pounds.");
	scanf("%f",&weight);
	
	float bmi;
	bmi = ( weight / (height * height)) * 703;
	printf("Your BMI is: %f\n",bmi);

	if (bmi < 18.5){
		printf("You are underweight.\n");
	}
	else if (bmi > 18.5 && bmi <= 24.9){
		printf("You are a healthy weight.\n");
	}
	else{
		printf("You are overweight.\n");
	}	
	
	return 0;
}

