Need Some Help Writing A Function ..
" Waist in inches = weight divided by 5.7 and then adjusted by adding 1/10 of an inch for each 2 years over age 28. (Note that the adjustment only takes place after a full 2 years. So, there is no adjustment for age 29, but 1/10th of an inch is added for 30.) "
double waistsize (int weight, int age) //Waist size Function
using namespace std;
double waistsize, adj;
if (age >= 30)
adj = (age - 28) / 2 * 0.1; // FIX
waistsize = weight / 5.7 + adj ;