Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 heights

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Multidimensional Array Data Management In Databases

Authors: Florin Rusu

1st Edition

1638281483, 978-1638281481

More Books

Students also viewed these Databases questions

Question

Describe three other types of visual aids.

Answered: 1 week ago