C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN: 9781337102087
Author: D. S. Malik
Publisher: Cengage Learning
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
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
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…
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
The mitotic index is a calculated value that represents the percentage of cells in a sample that are actively dividing. It involves counting the total number of cells present including those actively dividing or those in interphase, the total number of cells that are actively dividing (not including interphase), and then calculating what percentage of the total cells are actively dividing (the percentage undergoing mitosis).
The formula is: Mitotic index= # of cells in mitosis / # of cells in total x 100%
Use this formula to calculate the mitotic index for the diagram seen in Question 5. Show your calculations (you can use * for multiplication and / for division if you prefer) and indicate your final answer as a percentage rounded to the nearest tenth of a percentage (1 decimal place).
Note: The mitotic index seen in this simulation is much higher than you would see in a real tissue sample. The sample was simulated this way so that the counting and calculations would be easier…
Chapter 4 Solutions
C++ Programming: From Problem Analysis to Program Design
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
- Calculate the voltage V2 using Kirchhoff Voltage .Law ۱ مرفق د V3 = 15 V R3 E. 54 V R2 R1 V1 = 18 Varrow_forwardThe Harris-Benedict equation estimates the number of calories your body needs to maintainyour weight if you do no exercise. This is called your basal metabolic rate, or BMR.The formula for the calories needed for a woman to maintain her weight isBMR = 655 + (4.3 x weight in pounds) + (4.7 x height in inches) -(4.7 x age in years)The formula for the calories needed for a man to maintain his weight isBMR = 66 + (6.3 x weight in pounds) + (12.9 x height in inches) -(6.8 x age in years)A typical chocolate bar will contain around 230 calories. Write a program that allows the userto input his or her weight in pounds, height in inches, age in years, and the character M formale and F for female. The program should then output the number of chocolate bars thatshould be consumed to maintain one's weight for the appropriate sex of the specified weight,height, and age.arrow_forwardWrite your monthly allowance (computed by daily allowance x number of days in a month) compute the total.arrow_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_forwardOne 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*0.732)+8.987 A2=wrist measurement(at fullest point)/3.14053 A3=waist measurement(at navel)*0.15753 A4=hip measurement(at fullest point)*0.24953 A5=forearm measurement(at fullest point)*0.434 B=A1+A2-A3-A4+A5 Body fat=body weight-Barrow_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