According to the actual situation in america

This preview shows page 1 - 3 out of 4 pages.

According to the actual situation in America, scientists changed the coefficient of the formula, for boy the coefficient changed to 1.11~1.12 ; for girl 0.948~0.980 . Now based on these formulas, a program of height prediction formula for American children is wanted, which users can get child’s adult height after inputting parents’ heights . In this program we are using the coefficients given by American scientists. Design : Your program will behave differently under 2 scenarios, described below. Scenario 1 : The Height of Girl. Line # Output 1 2 3 4 5 Prompt user for height of Dad: ___ Prompt user for height of Mom: ___ Prompt user for the gender of the child (1 for female and 0 for male): ___ The adult height of the girl is: _________ inches ~ _________ inches.
Image of page 1

Subscribe to view the full document.