### Compiler not recognizing numbers

Hello!

I'm working on this homework assignment where the program takes in the user's height in inches, weight in pounds, and age, then calculates their hat size, jacket size and waist size. The formulas for these are as follows:

Hat: (weight/height) x 2.9
Jacket: (height x weight)/288 then adjusted by adding 1/8 an inch for every 10 years over the age of 30 (The adjustment only takes place after a full 10 years, so there is no adjustment for 30-39, but there is for 40)
Waist: (weight/5.7) then adjusted by adding 1/10 of an inch for each 2 years over the age of 28 (the adjustment only takes place after a full 2 years, so no adjustment for 29, but there is for 30, etc)

I'm supposed to utilize functions for each of the three formulas.

There's a couple things I can't figure out.
1. Why won't the compiler recognize 2.9 and 5.7 as numbers?
2. How do I adjust the calculation for the jacket and waist based on age?

Here's what I've got so far:

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172`` ``````#include #include using namespace std; double hatSize(int weight, int height); double jacketSize(int weight, int height, int age); double waistSize(int weight, int height, int age); int main(int argc, char *argv[]) { int userWeight, userHeight, userAge; double hatResult, jacketResult, waistResult; cout<<"How tall are you in inches? "; cin>>userHeight; cout<<"How much do you weigh in pounds? "; cin>>userWeight; cout<<"How old are you? "; cin>>userAge; hatResult = hatSize(userWeight, userHeight); jacketResult = jacketSize(userWeight, userHeight, userAge); waistResult = waistSize(userWeight, userHeight, userAge); cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); cout<<"\nYour hat size is "<< hatResult <<"!\n"; //output number 1! cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); cout<<"Your jacket size is "<< jacketResult <<"!\n"; //output number 2! cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); cout<<"Your waist size is "<< waistResult <<"!\n"; //output number 3! system("PAUSE"); return EXIT_SUCCESS; } double hatSize(int weight, int height) { const double a = 2.9; //why won't it recognize this as 2.9? double b = (weight/height); return (b * a); } double jacketSize(int weight, int height, int age) { const double a = 288; double b = (height * weight); double c = (b/a); if (age >= 40) { age += 10; c = (c + .80); } return c; } double waistSize(int weight, int height, int age) { const double a = 5.7; double b = (weight/a); if (age >= 28) { age += 2; b = (b + .10); } return b; } ``````