C++ Programming: From Problem Analysis to Program Design
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN: 9781337102087
Author: D. S. Malik
Publisher: Cengage Learning
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 4, Problem 18PE

One way to determine how healthy a person is by measuring the body fat of the person. The formulas to determine the body fat for female and male are as follows:

Body fat formula for women:

  • A1 = (body weight x 0.732) + 8.987
  • A2 = wrist measurement (at fullest point)/3.140
  • A3 = waist measurement (at navel) x 0.157
  • A4 = hip measurement (at fullest point) x 0.249
  • A6 = forearm measurement (at fullest point) x 0.434
  • B = A1 + A2 – A3 – A4 + A5
  • Body fat = body weight - B
  • Body fat percentage = body fat x 100/body weight

Body fat formula for men:

  • A1 = (Body weight x 1.082) + 94.42
  • A2 = wrist measurement x 4.15
  • B = A1 – A2
  • Body fat = body weight – B
  • Body fat percentage = body fat x 100/body weight

Write a program to calculate the body fat of a person.

Blurred answer
Students have asked these similar questions
The average daily temperature for an area can be approximated using the following equation: T = Tmean + (Tpeak – Tmean) cos (@(t – tpeak) %3D where Tmean is the mean temperature over a year, Tpeak is the highest daily mean temperature, w is the frequency of annual variation, tpeak is the day that the peak temperature occurs, and t represents the days 33 to 400 (inclusive, increments of 1). w has the value 2n/365. A. Write a function that takes Tpeak, tpeak, Tmean and t as inputs (4 inputs) and outputs the following 3 return values: The temperature for for each day The minimum temperature for the year The day with the minimum temperature B. In 2008, Melbourne's temperature statistics were: Tpeak = 25.9°C, tpeak = 13 and Tmean = 19.8°C Use the function you wrote in part A to plot on a single figure the following: Temperature for every day of the year as a black continuous line Use fprintf() to print the minimum temperature and the day it occurred. Then use a red asterisk to mark it on…
Context: Measuring Air Quality Levels of various air borne pollutants such as Nitrogen Monoxide (NO), Nitrogen Dioxide (NO2) and particulate matter (also called particle pollution) are all major contributors to the measure of overall air quality. For instance, NO2 is measured using micrograms in each cubic metre of air (㎍/m3). A microgram (㎍) is one millionth of a gram. A concentration of 1 ㎍/m3 means that one cubic metre of air contains one microgram of pollutant. To protect our health, the UK Government sets two air quality objectives for NO2 in their Air Quality Strategy The hourly objective, which is the concentration of NO2 in the air, averaged over a period of one hour. The annual objective, which is the concentration of NO2 in the air, averaged over a period of a year. The following table shows the colour encoding and the levels for Objective 1 above, the mean hourly ratio, adopted in the UK. Index 1 2 3 4 5 6 7 8 9 10 Band Low Low Low Moderate Moderate Moderate High…
The Harris-Benedict equation estimates the number of calories your body needs to maintain your weight if you do no exercise. This is called your basal metabolic rate, or BMR. The calories needed for a woman to maintain her weight is: WBMR = 655 + (4.3 × weight in pounds) + (4.7 × height in inches) − (4.7× age in years) The calories needed for a man to maintain his weight is: MBMR = 66 + (6.3 × weight in pounds) + (12.9 × height in inches) − (6.8 × age in years) A typical chocolate bar will contain around 230 calories. Write a java program that allows the user to input his or her weight in pounds, height in inches, and age in years. The program should then output the number of chocolate bars that should be consumed to maintain one’s weight for both a woman and a man of the input weight, height, and age.   NOTE: This is an application of a selection statement!  Input Data: Use a named constant for the number of calories in a “typical chocolate bar.” Use Scanner methods to enter the…
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
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Enhanced Discovering Computers 2017 (Shelly Cashm...
Computer Science
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Python Tutorial #10; Math Functions in Python; Author: Art of Engineer;https://www.youtube.com/watch?v=OviXsGf4qmY;License: Standard YouTube License, CC-BY