Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

IDEAL WEIGHT. A simple rule to estimate your ideal body weight is to allow 110 p

ID: 3649007 • Letter: I

Question

IDEAL WEIGHT. A simple rule to estimate your ideal body weight is to allow 110 pounds for the first 5 feet of height and 5 pounds for each additional inch. Write a program with a variable for the height of a person in feet and another variable for the additional inches. Assume the person is exactly 5 feet, 5 inches tall. Based on these values, calculate and output the ideal body weight.

INPUT and PROMPTS. None.

OUTPUT. The output should be:
Your ideal body weight is:
x pounds. where x is the integer value computed by your program.

CLASS NAMES. Your program class should be called IdealWeight

Explanation / Answer

I guess you're just supposed to make a program that calculates the ideal body weight only for a person exactly 5 feet, 5 inches tall so here's a program that does that in Java: public class IdealWeight { public static void main(String[] args) { int feet = 5; int inches = 5; int idealWeight = (feet/5)*110 + 5*inches; System.out.print("Your ideal body weight is: " + idealWeight + " pounds."); } } Hope this helps! Let me know if you have any questions :)