60 487
Assignments Done
98,1%
Successfully Done
In April 2018

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);
}
}
Expert's answer
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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions