I had to do this program which calculates wind chill factor for my homework.
-the answer is supposed to have 4 numbers after the decimal but it is just coming out as an integer with no decimal points even though I used setprecision(4)?
-the answer i am getting is not what the prof's answer was on our handout...
W= 33 – ((10√v – v + 10.5)(33-t))/23.1
is the equation, where w is the windchill factor, v is wind speed and t is temperature...did I write it correctly in the code?
Thanks a bunch.
int windchill(double, double);
double wind, temp;
cout<<"Please enter the wind speed: ";
cout<<"Please enter the temperature: ";
cout<<"The temperature should be less than 10. Try again: ";
cout<<"The wind chill index is "<<setprecision(4)<<fixed<<windchill(wind,temp)<<endl;
int windchill(double v, double t)