This program asks for a users height, weight, and age, and based off of that, it creates a clothing size.
for the jacket size, the height times the weight divided by 288 is supposed to find the right jacket size, but there's a twist. for every 10 years over 30, 1/8th of an inch is added to the height (for fitting reasons). however, I don't get the complete decimal. I've tried set precision and float numbers, but I don't think that worked.
I want to understand how to make the recommended jacket size variable more accurate, rather than just showing 2 numbers after the decimal.
int main()
{
std::cout << "Enter in your height, weight, and age.";
std::cout << " Must use inches, lbs, and years.\n\n";
float z = 0;
while(z < 999.0)
{
float height;
std::cout << "Height: ";
std::cin >> height;
> however, I don't get the complete decimal
don't understand your issue
provide an example input with the expected output and the erroneous one produced by your program.
> "Your recommended jacket size is " << jacketsize(weight, height) << '\n'
you aren't using the `age'