Problem Solving with C++ (9th Edition)
Problem Solving with C++ (9th Edition)
9th Edition
ISBN: 9780133591743
Author: Walter Savitch
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 4, Problem 2PP

Write a program that asks for the user’s height, weight, and age, and then computes clothing sizes according to the formulas:

■    Hat size = weight in pounds divided by height in inches and all that multiplied by 2.9.

■    Jacket size (chest in inches) = height times weight divided by 288 and then adjusted by adding 1/8 of an inch for each 10 years over age 30. (Note that the adjustment only takes place after a full 10 years. So, there is no adjustment for ages 30 through 39, but 1/8 of an inch is added for age 40.)

■    Waist in inches = weight divided by 5.7 and then adjusted by adding 1/10 of an inch for each 2 years over age 28. (Note that the adjustment only takes place after a full 2 years. So, there is no adjustment for age 29, but 1/10 of an inch is added for age 30.)

Use functions for each calculation. Your program should allow the user to repeat this calculation as often as the user wishes.

Blurred answer
07:52
Students have asked these similar questions
Write a program that asks the user to enter a month (1 for January, 2 for February, etc.) and thenprints the number of days in the month. For February, print “28 days”.Enter a month: 530 days
write a program that prompts the user to enter the number of students and each student name  and score and finally display the name of student with highest score and the student with second highest score.
Write a program that asks the user for a 24-hour time, then displays the time in 12-hour form: Enter a 24-hour time: 21:11 Equivalent 12-hour time: 9:11 PM Be careful not to display 12:00 as 0:00.

Chapter 4 Solutions

Problem Solving with C++ (9th Edition)

Ch. 4.3 - Write a function definition for a function called...Ch. 4.3 - Write a function definition for a function called...Ch. 4.3 - Write a function definition for a function isDigit...Ch. 4.3 - Write a function definition for a function...Ch. 4.4 - What is the purpose of the comment that...Ch. 4.4 - Prob. 16STECh. 4.4 - Prob. 17STECh. 4.4 - Carefully describe the process of program testing.Ch. 4.4 - Prob. 19STECh. 4.5 - If you use a variable in a function definition,...Ch. 4.5 - Suppose a function named Function1 has a variable...Ch. 4.5 - The following function is supposed to take as...Ch. 4.5 - Prob. 23STECh. 4.6 - Prob. 24STECh. 4.6 - Prob. 25STECh. 4.6 - Prob. 26STECh. 4.6 - Suppose you have two function definitions with the...Ch. 4.6 - This question has to do with the Programming...Ch. 4.6 - Prob. 29STECh. 4 - A liter is 0.264179 gallons. Write a program that...Ch. 4 - Modify your program from Practice Program 1 so...Ch. 4 - The price of stocks is sometimes given to the...Ch. 4 - Write a program to gauge the rate of inflation for...Ch. 4 - Enhance your program from the previous Practice...Ch. 4 - Write a function declaration for a function that...Ch. 4 - The gravitational attractive force between two...Ch. 4 - Prob. 8PCh. 4 - Prob. 9PCh. 4 - Write a program that computes the annual after-tax...Ch. 4 - Write a program that asks for the users height,...Ch. 4 - Modify your program from Programming Project 2 so...Ch. 4 - Write a program that outputs the lyrics for the...Ch. 4 - To maintain ones body weight, an adult human needs...Ch. 4 - You have invented a vending machine capable of...Ch. 4 - Your time machine is capable of going forward in...Ch. 4 - Do Programming Project 11 from Chapter 3 except...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
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
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Constants, Variables, Data types, Keywords in C Programming Language Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=d7tdL-ZEWdE;License: Standard YouTube License, CC-BY