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
A5 = 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 program to calculate the body fat of a person.