diff options
| author | JonCr <[email protected]> | 2022-11-10 00:01:58 -0800 |
|---|---|---|
| committer | JonCr <[email protected]> | 2022-11-10 00:01:58 -0800 |
| commit | 3d0f4c85602c4c7156e1e4132358503a7b0fcb65 (patch) | |
| tree | f475e177d6d3f45e714a87e1245d133a19c4edb3 | |
| parent | Update (diff) | |
| download | cst116-lab2-cognitiveshadow-3d0f4c85602c4c7156e1e4132358503a7b0fcb65.tar.xz cst116-lab2-cognitiveshadow-3d0f4c85602c4c7156e1e4132358503a7b0fcb65.zip | |
Update
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index f56dfa2..e85f9d9 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -2,12 +2,14 @@ // #include <iostream> +#include <cmath> using namespace std; using std::cout; using std::cin; using std::endl; +using std::pow; int selectType(); float getTemp(int& select); @@ -104,9 +106,9 @@ float getWindSpeed() } void calcWindChill(float temp, float windSpeed) { - double windChill = 0; + float windChill = 0; - windChill = 35.74 + 0.6215 * temp - 35.75 * windSpeed ^ 0.16 + 0.4275 * temp * windSpeed ^ 0.16; + windChill = 35.74 + 0.6215 * temp - 35.75 * pow(windSpeed, 0.16) + 0.4275 * temp * pow(windSpeed, 0.16); cout << endl << windChill; } |