EBK C++ PROGRAMMING: FROM PROBLEM ANALY
8th Edition
ISBN: 8220103648530
Author: Malik
Publisher: Cengage Learning US
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
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.
Expert Solution & Answer
Trending nowThis is a popular solution!
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 acceleration due to gravity at the surface of the moon is approximately 1/6 of the earth's. The acceleration due to gravity at the surface of moon is equal to:
Group of answer choices
64 in/s2
none of the above
1.6 ft/s2
5.4 m/s2
Chapter 4 Solutions
EBK C++ PROGRAMMING: FROM PROBLEM ANALY
Ch. 4 - Prob. 1TFCh. 4 - Prob. 6SACh. 4 - Prob. 12SACh. 4 - Write a program that prompts the user to input a...Ch. 4 - Write a program that prompts the user to output an...Ch. 4 - Prob. 4PECh. 4 - In a right triangle, the square of the length of...Ch. 4 - Write a program that mimics a calculator. The...Ch. 4 - Redo Exercise 8 to handle floating-point numbers....Ch. 4 - The number of lines that can be printed on a paper...
Ch. 4 - The short-term, 0-24 hours, parking fee, F, at an...Ch. 4 - Write a program to implement the algorithm that...Ch. 4 - Samantha and Vikas are looking to by a house in a...Ch. 4 - One way to determine how healthy a person is by...Ch. 4 - Ron bought several acres of farm to grow and sell...Ch. 4 - The cost of renting a room at a hotel is, say...Ch. 4 - Let l be a line in the x-y plane. If l is a...Ch. 4 - The first 11 prime integers are 2, 3, 5, 7, 11,...
Knowledge Booster
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
- The (x, y) coordinates of the hand at the top of a robot arm are given by: x = L, cos(8,) + L, cos(8, + 0,) y = L, sin(0,) + L,sin(8, + 02) Where Li and L2 are the distances of the parts of the arm from the shoulder to the elbow and from the elbow to the hand, 01 and 02 are the angles that these parts make with the x-axis. These angles can be expressed as: 0,(t) = a,t5 + a,t“ + azt³ 02(t) = bịt5 + b;t + b3t³ where t is the time. We assume that the arm starts to move at t= 0s and stops at tf=2s. The conditions that the angular position G1(t), angular velocity and angular acceleration should meet at the final time tf = 2 (in sec) are expressed in the following matrix form and allow us to obtain the coefficients a1, az and a3: 25 24 23 3x22||a2 = [az. [01f – 010] 5x24 4x23 | 20x23 12x22 6x2 with 0lf=43x/180, 610 = -197/180. a) Use MATLAB left division to solve the above system and get the coefficients a1, az and as b) Similarly the coefficients b1, bɔ and b3 can be obtained by solving a…arrow_forwardDesign an algorithm to find the weighted average of four test scores. The four test scores and their respective weights are given in the following format: (9) test Scorel weight Test Scorel For example, sample data is as follows: 75 0.20 95 0.35 85 0.15 65 0.30arrow_forwardassuming a variable y has been assigned the value 6, what is the value of!(y<7)arrow_forward
- Summary During winter when it is very cold, typically, everyone would like to know the windchill factor, especially, before going out. Meteorologists use the following formula to compute the windchill factor, W: W = 35.74 + 0.6215 × T - 35.75 × V0.16 + 0.4275 × T × V0.16 where V is the wind speed in miles per hour and T is the temperature in degrees Fahrenheit. Instructions Write a program that prompts the user to input the wind speed in miles per hour, and the temperature in degrees Fahrenheit. The program then outputs the current temperature and the windchill factor. Your program must contain at least two functions: one to get the user input and the other to determine the windchill factor.arrow_forwardFind the h °g and g °h for following: a. If g(x) = Vx – 4 and h(x) = x³ + 4 b. If g(x) = x² +1 and h(x) = x +2arrow_forwardA multiple-choice quiz consists of 5 questions with 4 possible choices. In how many ways can a student answer the questions if the student answers every question (i.e. they don't leave any question blank). Group of answer choices. 1024,512,2048,256arrow_forward
- An ISBN-10 (International Standard Book Number) consists of 10 digits: The last digit, is a checksum, which is calculated from the other nine digits using the following formula: (d1 x 1 + d2 x 2 + d3 x 3 + d4 x 4 + d5 x 5 + d6 x 6 + d7 x 7 + d8 x 8 + d9 x 9) % 11) If the checksum is 10, the last digit is denoted as X, according to the ISBN convention. Write a program that prompts the user to enter the first 9 digits as a string and displays the 10-digit ISBN (including leading zeros). Your program should read the input as a string.arrow_forwardSkydiving Bibi is a skydiving instructor. Before carrying out skydiving activities, Bibi will always ask the name, height, and age of the participants. Bibi's participants is always 2 people. To make it easier to remember their identities, Bibi gave them a paper to write down their identity. But because they are very enthusiastic in doing skydiving, they write their identity in a single line only (for both of the participants), so it wasn't quite neat and it made difficult for Bibi to see it, and resulted in the skydiving process being disturbed. As one of the organizer committee, you do not want this activity to be disturbed and plan to provide a program that provides their identity neatly to Bibi. Format Input Input consists of 1 line. It contains the identity of 2 people in a row Ni, Ti, Ui - the name, height, and age of the i-th participant. Format Output The output consists of 6 lines. The first line, "Name 1: N1". The second line, "Height 1: T1". The third line, "Age: U1". For…arrow_forwardStock Return Performance Analysis: An investment firm monitors the daily returns of a particular stock in the S&P 500. The daily return is defined as the percentage change in the stock's price from the previous day. The firm recorded the stock's daily returns at random times during the last quarter of the year. Assume that the standard deviation of the population of daily returns is known to be σ = 2.8%. The data for daily return for the particular stock in the S&P 500 is given in Excel under “DAILY RETURN” sheet. a) Find the mean and the standard deviation of 20 random samples of daily returns.? b) Based on a 95% confidence level, what is the margin of error for the mean estimate of the daily return? c) Given the margin of error computed in part (b), provide a 95% confidence interval for μ, the mean daily return for this stock. The stock’s long-term average daily return is stated as 1.5%. Are the results of this analysis consistent with the stock’s long-term…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
- Enhanced Discovering Computers 2017 (Shelly Cashm...Computer ScienceISBN:9781305657458Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. CampbellPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
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
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Python Tutorial #10; Math Functions in Python; Author: Art of Engineer;https://www.youtube.com/watch?v=OviXsGf4qmY;License: Standard YouTube License, CC-BY