samedi 13 novembre 2021

CREATE A JAVA PROGRAM

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 = Waist measurement x 4.15
B = A1 - A2
Body fat = body weight - B
Body fat percentage = body fat x 100 / body weight

Write a java program to calculate the body fat of a person.

Aucun commentaire:

Enregistrer un commentaire