Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm trying to write a code to calculate body fat and body fat percentage, but I don't know why my calculations are not working. If

image text in transcribedimage text in transcribed

image text in transcribed

I'm trying to write a code to calculate body fat and body fat percentage, but I don't know why my calculations are not working. If you right click on the image and select "open image in new tab" it should show up more clearly

int F; int M; double al; double a2; double a3 double 84; double a5; double b; 18 19 double bodyweight; double bodyFat; double bodyFatPercent; double wristheasure double waistheasure double hipMeasure; double foreMeasure; 21 char gender; printf("This program deternines the body fat of a person.Enter your gender (f|F m M): ") scanf(* %c", &gender); 30 31 if (gender II genderF) printf(" Enter body weight (in pounds)s in") scanf("%1f", &bodyweight); printf("Enter wrist measurement at fullest point (in inches): In"); scanf("%1f", &wristMeasure); printf("Enter waist neasurement at navel (in inches):n); scanf("If". RwaistHeasure) printf"Enter hip measurement at fullest point (in inches):In") scanf(lf", &hipHeasure) 13 printf("Enter forearn neasurement at fullest point scanf("%1f", &foreMeasure); 45 (in inches): In") al-. (bodyhleight * ,732) + 8.987; a2(wristreasure 1 3.140) a3--(waistreasure e. 157); 64--(hipMeasure , 249); as(foreMeasure 8.434); b((al +a2) - aJ)-4)a5; bodyfatbodyweight -b bodyFatPercent(bodyfat 180) / bodywleights 54 58 59 printf("Body fat: %,61f ", bodyFat); printf("Body fat percentage: %.6ir, bodyFatpercent); C3.2 program determines the body fat of a person.Enter your gender (f F mM) Enter body weight (in pounds): 110 nter wrist measurement at fullest point (in inches): 12 Enter waist measurement at navel (in inches): 30 Enter hip measurement at fullest point (in inches) 34 Enter forearm measurement at fullest point (in inches): 16 Body fat:0.000000 Body fat percentage: 0.000000 Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Development Of Knowledge Framework For Affective Content Analysis

Authors: Swarnangini Sinha

1st Edition

B0CQJ13WZ1, 979-8223977490

More Books

Students also viewed these Databases questions