#include using namespace std; #include double mph2mtrpsec(double mph); double f2c(double temp); double c2f(double temp); double windchill(double speed,double temp); int main() { double wspeed,temp; while(1){ cout << "What is the wind speed?"; cin >> wspeed; if ( wspeed == 0.0 ) break; cout << "and what is the temperature?"; cin >> temp; cout << "At that wind speed and that temperature, the chill factor is "; cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(1); cout << c2f(windchill(mph2mtrpsec(wspeed),f2c(temp))) << endl; } return 0; } double mph2mtrpsec(double mph){ return (mph * 0.44704); } double f2c(double temp){ return ((temp-32.0)*5.0/9.0); } double c2f(double temp){ return (temp*9.0/5.0 + 32.0); } double windchill(double speed,double t){ return (33.0 - ((10*sqrt(speed) - speed + 10.5) * (33.0 - t))/23.1); }