#iclude <iostream>
#include <cmath>
#include <math.h>
using namespace std;
int main()
{
double speed = 5;
int temp = -5;
int windChill;
double roundedWindChill;
windChill = ((35.74 + (0.6215 * temp) - (35.75 * pow(speed, 0.16)) + (0.4275 * temp * (pow(speed0.16)))) * 10.0) + 0.5;
roundedWindChill = windChill / 10.0;
cout << roundedWindChill;
}
When I run this I get 16.3
, however I should be getting 16.4 because the answer with an additional figure would be 16.37
. Not sure why this is not rounding.
Thanks for the help!