Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Variable to use: *ints - Dad height - moms height - female = f child - male = m child Notes: -Multiple inputs: dad, moms

Variable to use:

*ints

- Dad height

- moms height

- female = f child

- male = m child

Notes:

-Multiple inputs: dad, moms and child's height

-If statements used for child's gender

-Read the directions/ descriptions given

One way to estimate the adult height ofchild is to use the following formula which uses the height of the parents:

HeightMaleChild =(( HeightMother * 13/12) + HeightFather))/2

HeightFemaleChild =(( HeightFather * 12/13) + HeightMother))/2

All height is in inches. to do the program it takes a input the gender of the child, the height of the mother, the height of the father in inches and outputs the estimated height of the child in inches. The program should allow the user to enter a new set of values and should continue until the user is done. The user should input the height in feet and inches. The output should be in feet and inches.

Sample exchange

Enter the gender of your future child. Use 1 for female, 0 for male.

1

Enter the height in feet then the height in inches of the mom.

5

11

Enter the height in feet then the height in inches of the dad.

6

2

Your future child is estimated to grow to 5 feet and 9 inches.

Enter 'Y' to run again, anything else to exit.

Y

Enter the gender of your future child. Use 1 for female, 0 for male.

0

Enter the height in feet then the height in inches of the mom.

5

10

Enter the height in feet then the height in inches of the dad.

5

11

Your future child is estimated to grow to 6 feet and 1 inches.

Enter 'Y' to run again, anything else to exit.

n

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

Students also viewed these Programming questions

Question

=+3. Calculate the real deficit or surplus in the following cases:

Answered: 1 week ago