3 The wind chill factor WCF measures how cold it feels with

3. The wind chill factor (WCF) measures how cold it feels with a given air temperature T [F] and wind speed V [miles/hr]:

WCF = 35.7 + 0.6T - 35.7V0.16 + 0.43T*V0.16

Write a function that has input arguments of temperature and airspeed and returns the WCF.

Using loops, print a table that shows WCF for temperatures ranging from -20 to 55 in steps of 5, and wind speeds ranging rom 0 to 55 in steps of 5. Call the function within the “loops” to calculate each WCF.

Solution

Please do mention the programming language from next time. As per now, I can help you with c++.

#include <iostream>
#include <cmath> //to use exponent function pow()
using namespace std;
double calcWCF(int t,int v)// t= temperature in fahreinheit and v = velocity of wind
{
double wcf = 35.7 + 0.6 * t - 35.7 * (pow(v,0.16)) + 0.43 * t * (pow(v,0.16));//formula to calculate wcf
return wcf;
}
int main() {

for (int t = -20; t < 55; t+=5) {//temperature looping in steps of 5 degree fahreinheit
for (int v = 0; v < 55; v+=5) {//wind velocity loooping iin steps of 5
cout<<\"Temperature: \"<<t<<endl;
cout<<\"Velocity of wind: \"<<v<<endl;
cout<<\"Wind Chill Factor: \"<<calcWCF(t, v)<<endl;//tabular form presentation
}
}
return 0;
}

ABOVE IS THE WORKING CODE WITH PROPER DOCUMENTAION. HOPE IT HELPS.

THANKS FOR USING CHEGG

3. The wind chill factor (WCF) measures how cold it feels with a given air temperature T [F] and wind speed V [miles/hr]: WCF = 35.7 + 0.6T - 35.7V0.16 + 0.43T*

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site