I created a java program to calculate a persons BMI, but we have to convert the weight from pounds to kilos and height from inches to meters using the numbers in my program, but it just doesnt worl the way its suppose to can some PLEASE help me figure it out.
//Body Mass Index.java
//Davina Moore
//Due: September 18, 2008
//This java program is designed to compute your Body Mass Index
import java.util.Scanner;
import java.text.DecimalFormat;
public class Body_Mass_Index
{
public static void main(String args[ ])
{
double pound = .0453592;
double inches = .0254;
double weight = pound *.0453592;
double height = inches *.0254;
double BMI = weight/(height*height);
Scanner scan = new Scanner(System.in);
System.out.println("Please enter in your weight: ");
weight = scan.nextDouble();
System.out.println("Please enter in your height: ");
height = scan.nextDouble();
//rounds the answer to 2 decimal places
DecimalFormat fmt = new DecimalFormat("0.##");
System.out.println("Your Body Mass Index is: " + fmt.format(BMI));
}
}