Scevus
02-19-2013, 11:00 PM
We have to make a program that computes Wind Chill here is my code. I need help fixing it.
#include <iostream>
using namespace std;
int main()
{
double F; //F is Farenheit Temperature
double WS; //WS is Wind Speed
double WC = 35.74 + 0.6215F - 35.75WS.16 + 0.4275FWS.16; //WC is Wind Chill
cout << "Please enter Temperature in Farenheit:";
cin >> F;
cout << "Please enter Wind Speed in mph";
cin >> WS;
if ( F >= -58 && F <= 41 || WS >= 2 );
cout << "Your Wind Chill in Farenheit is:" << WC;
else
cout << "One or more of your numbers inputed is invalid. Make sure your temperature is between -58 and 41 and your wind speed is greater than or equal to 2";
system ("Pause");
return 0;
}
#include <iostream>
using namespace std;
int main()
{
double F; //F is Farenheit Temperature
double WS; //WS is Wind Speed
double WC = 35.74 + 0.6215F - 35.75WS.16 + 0.4275FWS.16; //WC is Wind Chill
cout << "Please enter Temperature in Farenheit:";
cin >> F;
cout << "Please enter Wind Speed in mph";
cin >> WS;
if ( F >= -58 && F <= 41 || WS >= 2 );
cout << "Your Wind Chill in Farenheit is:" << WC;
else
cout << "One or more of your numbers inputed is invalid. Make sure your temperature is between -58 and 41 and your wind speed is greater than or equal to 2";
system ("Pause");
return 0;
}