Calculates the English BMI of the specified statistics. - Java java.lang

Java examples for java.lang:Math Algorithm

Description

Calculates the English BMI of the specified statistics.

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        double weight = 2.45678;
        double height = 2.45678;
        System.out.println(calculateEnglishBMI(weight, height));
    }/*from ww w .ja va2s  . com*/

    /**
     * Calculates the English BMI of the specified statistics.
     * @param weight The weight of the person in pounds.
     * @param height The height of the person in inches.
     * @return Returns the BMI of the person.
     */
    public final static float calculateEnglishBMI(double weight,
            double height) {
        return (float) (weight / (height * height)) * 703;
    }
}

Related Tutorials