Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java One way to estimate the adult height of a child is to use the following formula, which uses the height of the parents: [
Java
One way to estimate the adult height of a child is to use the following formula, which uses the height of the parents: \[ \begin{array}{l} H_{\text {male_child }}=\left(\left(H_{\text {mother }} \times 13 / 12 ight)+H_{\text {father }} ight) / 2 \\ H_{\text {femak_child }}=\left(\left(H_{\text {farther }} \times 12 / 13 ight)+H_{\text {mother }} ight) / 2 \end{array} \] All heights are in inches. Write a program that takes as input the gender of the child, the height of the mother in inches, and the height of the father in inches, and outputs the estimated adult height of the child in inches. The program should allow the user to enter a new set of values and output the predicted height until the user decides to exit. The user should be able to input the heights in feet and inches, and the program should output the estimated height of the child in feet and inches. Use the int data type to store the heightsStep 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