Absolute C++
Absolute C++
6th Edition
ISBN: 9780133970784
Author: Walter Savitch, Kenrick Mock
Publisher: Addison-Wesley
bartleby

Videos

Textbook Question
Book Icon
Chapter 3, Problem 10PP

One way to estimate the height of a child is to use the following formula, which uses the height of the parents: H male_child = ( ( H mother 13 / 12 ) + H father ) / 2 H female_child = ( ( H father 12 / 13 ) + H mother ) / 2

All heights are in inches. Write a function that takes as input parameters the gender of the child, height of the mother in inches, and height of the father in inches, and outputs the estimated height of the child in inches. Embed your function in a program that allows you to test the function over and over again until telling the program 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 integer data type to store the heights.

Blurred answer
Students have asked these similar questions
Discrete Mathematics: Assignment details:  Replace all the 0 (Zero) digits in your ID by 4. Example: If your ID is 38104680, it becomes 38144684 Take the first 6 digits and substitute them in this expression (( A + B) / C) * ((D-E)/F)-2) according to the following table;                                                            Letter Replace by Digit Example Digit A 1st 3 B 2nd 8 C 3rd 1 D 4th 4 E 5th 4 F 6th 6   After substitution your expression will be similar to this (( 3 + 8) / 1) * ((4-4)/6)-2). Draw a rooted tree that represents your expression.                              What is the prefix form of this expression.                   3.What is the value of the prefix expression obtained in step 2 above?
Golf scores record the number of strokes used to get the ball in the hole. The expected number of strokes varies from hole to hole and is called par (i.e. 3, 4, or 5). Each score's name is based on the actual strokes taken compared to par: "Eagle": number of strokes is two less than par "Birdie": number of strokes is one less than par "Par": number of strokes equals par "Bogey": number of strokes is one more than par Given two integers that represent par and the number of strokes used, write a program that prints the appropriate score name. Print "Error" if par is not 3, 4, or 5. Ex: If the input is: 4 3 the output is: Birdie (in java please)
Golf scores record the number of strokes used to get the ball in the hole. The expected number of strokes varies from hole to hole and is called par (i.e. 3, 4, or 5). Each score's name is based on the actual strokes taken compared to par: "Eagle": number of strokes is two less than par "Birdie": number of strokes is one less than par "Par": number of strokes equals par "Bogey": number of strokes is one more than par Given two integers that represent par and the number of strokes used, write a program that prints the appropriate score name. Print "Error" if par is not 3, 4, or 5 need answer in python

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
What is a class?

Starting Out with Java: Early Objects (6th Edition)

Can abstract classes also contain abstract properties?

Starting out with Visual C# (4th Edition)

What does the indirection operator do?

Starting Out with C++ from Control Structures to Objects (8th Edition)

Charge Account Modification Modify the charge account validation class that you wrote for Programming Challenge...

Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Computer Programming for Beginners | Functions, Parameters & Arguments | Ep24; Author: Programming With Avelx;https://www.youtube.com/watch?v=VXlh-qJpfw0;License: Standard YouTube License, CC-BY