Answer to Question #67448 in Java | JSP | JSF for monsterdude

Question #67448
Create a Weight application that prompts the user for their gender (male or female) and their height and then determines their ideal body weight. The following formula is used to approximate ideal body weight:

men: Ideal Body Weight (in kilograms) = 50 + 2.3 kg per inch over 5 feet.
women: Ideal Body Weight (in kilograms) = 45.5 + 2.3 kg per inch over 5 feet.


import java.util.Scanner;
public class Body{
public static void main (String [] args){

Scanner keyboard = new Scanner(System.in);

System.out.println("Please enter your gender (Male/Female)");
String gender = keyboard.nextLine();

System.out.println("Please enter your height in inches");
double height = keyboard.nextDouble();

/* Fill in answer here
* idealWeight should your variable
*/

System.out.println("Your gender is: "+gender);
System.out.println("Your height is: "+height);
System.out.println("Your ideal weight is: "+idealWeight);
}
}
1
Expert's answer
2017-04-14T13:45:54-0400
Dear monsterdude, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS