Hey I hope this is the right place, I'm taking C++ for my first programming class in college and I have a problem that I need to solve. I am writing a function for finding jacket size and I need to add 1/8 inch for every 10 years starting at age 30. Every 10 years you need to add another 1/8 inch so from 30-39 its 1/8 from 40-49 its 1/4 and so on. How would I write this in the function? Thanks!
Their size is a variable being inputed by the user. What I have right now is:
{
int height, age, weight;
double hat_size, jacket_size, waist_in_inches;
cout<<"Enter your height: "<<endl;
cin>>height;
cout<<"Enter your age: "<<endl;
cin>>age;
cout<<"Enter your weight: "<<endl;
cin>>weight;
hat_size=hat_function(weight, height);
cout<<"Your hat size is: "<<hat_size<<endl;