Science: Wind-Chill Temperature

less than 1 minute read

The code has been modified slightly and now uploaded to the site.

Question

<— Return Home

217.cpp

#include <iostream>
#include <math.h>
using namespace std;

int main(){
    double twc;
    double fahrenheit;
    double mph;

    std::cout << "Enter the temperature in Fahrenheit: \n";
    std::cin >> fahrenheit;
    std::cout << "Enter the wind speed in miles per hour: \n";
    std::cin >> mph;

    twc = 35.74 + (0.6215 * fahrenheit) - 35.75 * (pow(mph, 0.16)) + 0.4275 * fahrenheit * (pow(mph, 0.16));

    std::cout << "The wind chill index is " << twc;
}

<— Return Home