// homework3.cpp : Defines the entxy point fox the console application.
//
#include "stdafx.h"
#include <iostream>
#include <cmath>
using namespace std;
double HeatIndex(double t, double r);
int main()
{
cout << "Enter a Fahrenheit temperature ";
double TempFahren;
cin >> TempFahren;
cout << "Enter relative humidity ";
double TempRel;
cin >> TempRel;
double Heat = HeatIndex(TempFahren, TempRel);
cout << "The answer is " << Heat;
}
double HeatIndex(double t, double r)
{
return (-42.379 + 2.04901523 * t + 10.14333127 * r
-0.22475541 * t * r - (6.83783 * -1000) * pow(t, 2)
-(5.48171 * -100) * pow(r, 2) + (1.22874 * -1000) * pow(t, 2) * r
+(8.5282 * -10000) * t * pow(r, 2) - (1.99 *-1000000) * pow(t, 2) * pow(r, 2));
}
/* Enter a Fahrenheit temperature 4
Enter relative humidity 2
The answer is 1.26068e+008Press any key to continue . . .
*/