Question
BMI Calculator (Java in-class assignment 10 pts.)In this assignment you will write a Java program that will calculate a persons body mass index (BMI). Follow
BMI Calculator (Java in-class assignment 10 pts.)In this assignment you will write a Java program that will calculate a persons body mass index (BMI). Follow the requirements below, and good luck! Use ZyBooks Coding window to write your code (save your code often to Word). User input will be weight in pounds and height in inches. Prompt user for weight and height until a q is entered. Use variables to store all input and the results of the calculationo Weight and height are whole numbers, but the results of the formula can produce a decimal value. What data type should you use to store the results? Use the formula below for your calculationso BMI = (Weight (LBS) x 703) (Height * Height) Output the results to the screen to two (2) decimal places Be sure to include comments in your code and practice good self-documentation by giving descriptive names to your variables Run the program and debug your code. Copy the completed code to a word document and submit via Canvas for creditHint: to enter a single character into a variable, use this code: quitCmd = scnr.next().charAt(0);Hint: use printf method to output BMI to two decimal places. INPUT: 220 68 a 145 72 a 190 70 q
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started