Question

Program 1 BMI Calculator Write a Java program to calculate the Body Mass Index (BMI) BMI...

Program 1 BMI Calculator

Write a Java program to calculate the Body Mass Index (BMI)

BMI can be calculated as follow

BMI = (weight in pounds X 703) / (Height in inches X Height in inches)

0 0
Add a comment Improve this question Transcribed image text
Answer #1
import java.util.Scanner;

public class BMICalculator {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.print("Enter weight in pounds: ");
        double weight = in.nextDouble();
        System.out.print("Enter height in inches: ");
        double height = in.nextDouble();
        double bmi = (weight * 703) / (height * height);
        System.out.println("Your BMI is " + bmi);
    }
}
Add a comment
Know the answer?
Add Answer to:
Program 1 BMI Calculator Write a Java program to calculate the Body Mass Index (BMI) BMI...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a program to calculate the Body Mass Index (BMI). The formulae to calculate the BMI...

    Write a program to calculate the Body Mass Index (BMI). The formulae to calculate the BMI are BMI = (weightinPounds x 703) / (heightinInches x heightinInches ) or BMI = weightinKilograms / (heightinMeters x heightinMeters ) Your program should read the user's weight in pounds and height in inches (or, Kilograms and meters, if you prefer), calculate and display the BMI. Your program should also display a message indicating how the BMI is evaluated, based on the following BMI values:...

  • Visual Basic: The federal government developed the body mass index (BMI) to determine ideal weights. Body...

    Visual Basic: The federal government developed the body mass index (BMI) to determine ideal weights. Body mass index is calculated as 703 times the weight in pounds, divided by the square of the height in inches, and then round to the nearest whole number. Define a function that accepts a person’s weight and height as inputs and returns the person’s health status (A BMI of 19 to 25 corresponds to a healthy status).

  • The body mass index (BMI estimates the amount of fat in a person's body. It is defined as the person's mass m in kilograms divided by the square of the person's height h in meters. Write...

    The body mass index (BMI estimates the amount of fat in a person's body. It is defined as the person's mass m in kilograms divided by the square of the person's height h in meters. Write the formula for BMI in terms of m and h. 0 BMI In the United States, most people measure weight in pounds and height in feet and inches. When weight W is measured in pounds and height h is measured in inches, the BMI...

  • In Java Body mass index is a measure of whether someone's weight is appropriate for their...

    In Java Body mass index is a measure of whether someone's weight is appropriate for their height. A body- mass-index value between 19 and 25 is considered to be in the normal range. Here's the formula for calculating body mass index: BMI- (704 x weight in pounds) / height in inches*2 a) Implement a program that prompts the user for height and weight values and displays the associated body mass index. Perform input validation by making sure that the user...

  • 1. Your Body Mass Index (BMI) is a measure of your weight relative to your height....

    1. Your Body Mass Index (BMI) is a measure of your weight relative to your height. The formula can be found here: http://www.whathealth.com/bmi/formula.html (use the Imperial U.S. Method). Write an algorithm in pseudocode to calculate and display a person's BMI accepting as input their height in feet and inches and their weight in pounds. The output of your algorithm should be as follows: a. BMI b. A statement of whether the result is underweight, normal, overweight or obese.

  • Java program Build the interface: A BMI calculator First: add a Layered Pane; drag it from...

    Java program Build the interface: A BMI calculator First: add a Layered Pane; drag it from the right window to your blank frame. Then enlarge the pane to make it cover your entire frame. Use the text fields and labels to build the following application. Example: String inch = jTextField1.getText(); You need to convert value in the text field from String to integer when you do the calculation. How to Calculate BMI 1 feet = 12 inches BMI= weight in...

  • OGICAL 28. Body mass index (BMI) is a measure of obesity. In standard units, it is...

    OGICAL 28. Body mass index (BMI) is a measure of obesity. In standard units, it is calculated by the formula EMENTS BMI = 7032 ATEMENT NESTED INTS where Wis weight in pounds, and His height in inches. The obesity classification is BMI Classification Below 18.5 Underweight 18.5 to 24.9 Normal 25 to 29.9 Overweight 30 and above Obese Tue Write a program in a script file that calculates the BMI of a person. The program asks the person to enter...

  • python2.7 25 Points. Create a class named BMIGUI with the following behavior. A template has been...

    python2.7 25 Points. Create a class named BMIGUI with the following behavior. A template has been provided for you and you cannot modify the template. You must use grid) to format the interface and you must get as close as possible the layout shown below. The entry box has a width parameter in its constructor you can use to make the box smaller 3. The BMI categories are as follows: Underweight= <18.5 Normal weight18.5-24.9 . Overweight 25-29.9 Obese BMI of...

  • Using JAVAFX The application will calculate Body Mass Index (BMI) for people. It must be able...

    Using JAVAFX The application will calculate Body Mass Index (BMI) for people. It must be able to accept as input weights (in pounds or kilos), and height (in inches or centimeters). The application should have a calculate button, and should display the result as well as if the data puts the person in one of 4 categories underweight ( BMI < 18.5) , normal weight (BMI 18.5-24.9), overweight (BMI 25.0 - 29.9) or overweight (BMI > 30) For full credit...

  • 1. Write a personalized BMI calculator in the form of a function called  bmi_calculator(). This function prompts...

    1. Write a personalized BMI calculator in the form of a function called  bmi_calculator(). This function prompts the user for their appelation, their first name, their last name, their height in inches, their weight in pounds, and prints a message of the form: BMI Record for _APPELATION _FIRSTNAME _LASTNAME: Subject is _X feet _Y inches tall and weighs _Z pounds. The subject's BMI is _B. (The words preceded by _ are replaced with the input provided by the user.) Your solution...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT