Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To explore the basic use of variables, write a java program with using only 3 variables that computes an individual's body mass index (BMI). Health

To explore the basic use of variables, write a java program with using only 3 variables that computes an individual's body mass index (BMI). Health professionals use this number to advise people about whether or not they are overweight. Given an individual's height and weight, we can compute that person's BMI. A simple BMI program, then, would naturally have three variables for these three pieces of information.

BMI = weight / (height * height) * 703

The person's weight is 195 and height is 70. Based on the person's information, calculate BMI and display the result on the console window.

Then, compute a new BMI assuming the person lost 15 pounds (going from 195 pounds to 180 pounds)

Limit to use only 3 variables: bmi, weight and height.

Sample output of the program:

Previous BMI: 27.97653061

Current BMI: 25.82448979

In the simplest java code possible, please. Nothing advanced.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Successful Keyword Searching Initiating Research On Popular Topics Using Electronic Databases

Authors: Randall MacDonald, Susan MacDonald

1st Edition

0313306761, 978-0313306761

More Books

Students also viewed these Databases questions

Question

Make efficient use of your practice time?

Answered: 1 week ago