C++ How to Program (10th Edition)
C++ How to Program (10th Edition)
10th Edition
ISBN: 9780134448237
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 2, Problem 2.30MAD

(Body Mass Index Calculator) We introduced the body mass index (BMI) calculator in Exercise 1.9. The formulas for calculating BMI are

    B M I = w e i g h t   i n   P o u n d s × 703 h e i g h t   i n   i n c h e s × h e i g h t   i n   i n c h e s

Or

B M I = w e i g h t   i n  kilograms h e i g h t   i n  meters × h e i g h t   i n  meters

Create a BMI calculator application that reads the user’s weight in pounds and height in inches (or, if you prefer, the user’s weight in kilograms and height in meters), then calculates and displays the user’s body mass index. Also, the application should display the following information from the Department of Health and Human Services/National Institutes of Health so the user can evaluate his/her BMI:

    BMI VALUES
    Underweight: less than 18.5
    Normal:between 18.5 and 24.9
    Overweight: between 25 and 29.9
    Obese: 30 or greater

[Note: In this chapter, you learned to use the int type to represent whole numbers. The BMIcalculations when done with int values will both produce whole-number results. In Chapter 4 you’ll learn to use the double type to represent numbers with decimal points. When the BMI calculations are performed with doubles, they’ll each produce numbers with decimal points these are called “floating-point” numbers.]

Blurred answer
Students have asked these similar questions
Fill in the blanks to rewrite the following statement with variables: “Given any positive real number, there is a positive real number that is smaller.” (a) Given any positive real number r, there is _____________ s such that s is ___________ . (b) For any _________ , __________ such that s < r
Simplify the following expression as much as possible ? *
What is printed by the following code? Please explain I’m confused

Chapter 2 Solutions

C++ How to Program (10th Edition)

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.
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
Literals in Java Programming; Author: Sudhakar Atchala;https://www.youtube.com/watch?v=PuEU4S4B7JQ;License: Standard YouTube License, CC-BY
Type of literals in Python | Python Tutorial -6; Author: Lovejot Bhardwaj;https://www.youtube.com/watch?v=bwer3E9hj8Q;License: Standard Youtube License