Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Regular C programming please DESCRIPTION One way to determine how healthy a person is by measuring the body fat of the person. The formulas to
Regular C programming please
DESCRIPTION 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: Al = Body Weight *0.732 + 8.987 A2 = Wrist Measurement At Fullest Point / 3.140 A3 = Waist Measurement At Navel * 0.157 A4 = Hip Measurement At Fullest Point * 0.249 A5 = Forearm Measurement At Fullest Point *0.434 B = Al + A2-A3-A4 + A5 Body Fat = Body Weight - B Body Fat Percentage = Body Fat * 100 / Body Weight Body fat formula for men: Al = Body Weight * 1.082 + 94.42 A2 = Waist Measurement At Fullest Point * 4.15 B = Al-A2 Body Fat = body Weight - B: Body Fat Percentage = Body Fat * 100 / body weight Write a program that asks for the gender and the all the input appropriate to the gender, then calculate and display the Body Fat and Body Fat Percentage. If the gender is invalid, please display: Invalid gender code. and ignore all other inputs. For Example: This program determines the body fat of a person. Enter your gender (f|F|M|M): F Enter body weight (in pounds): 120 Enter wrist measurement at fullest point (in inches): 5 Enter waist measurement at navel (in inches): 32 Enter hip measurement at fullest point (in inches): 36 Enter forearm measurement at fullest point (in inches): 23 Body fat: 25.586643 Body fat percentage: 21.322203 This program determines the body fat of a person Enter your gender (f|F|m|M): m Enter body weight (in pounds): 120 Enter waist measurement at fullest point (in inches): 5 Body fat: -83.510000 Body fat percentage: -69.591667Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started