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:
o A1 = (body weight ´ 0.732) + 8.987
o A2 = wrist measurement (at fullest point) / 3.140
o A3 = waist measurement (at navel) ´ 0.157
o A4 = hip measurement (at fullest point) ´ 0.249
o A5 = forearm measurement (at fullest point) ´ 0.434
o B = A1 + A2 - A3 - A4 + A5
o Body fat = body weight - B
Body fat formula for men:
o A1 = (body weight ´ 1.082) + 9.442
o A2 = wrist measurement ´ 4.15
o B = A1 - A2
o Body fat = body weight - B
o Body fat percentage = body fat ´ 100 / body weight
Write a program to calculate the body fat of a person in C++ language.