One way to determine how healthy a person is by measuring the body fat of the...

50.1K

Verified Solution

Question

Programming

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

Body fat formula for women:

  • A1 = 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 = A1 + A2 - A3 - A4 + A5
  • Body Fat = Body Weight - B
  • Body Fat Percentage = Body Fat * 100 / Body Weight

Body fat formula for men:

  • A1 = Body Weight * 1.082 + 94.42
  • A2 = Waist Measurement At Fullest Point * 4.15
  • B = A1 - A2
  • Body Fat = body Weight - B;
  • Body Fat Percentage = Body Fat * 100 / body Weight

In C program

Write a program that asks for the gender and the all the inputappropriate to the gender, then calculate and display the Body Fatand Body Fat Percentage.

Example (Numbers and symbols withunderscore indicate an input):

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.591667

Answer & Explanation Solved by verified expert
3.5 Ratings (491 Votes)
Following is the C program include void main char ch int weight waist wrist hip farm float A1 A2 A3 A4 A5 B bfat bfatp printfThis program determines the body fat of a person printfEnter your    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students