summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/cst116-lab2-wilson.cpp
diff options
context:
space:
mode:
authorjacobdw22 <[email protected]>2022-11-02 14:02:25 -0700
committerjacobdw22 <[email protected]>2022-11-02 14:02:25 -0700
commit30f52b1c77d2558838f236596dc48ea8209f921f (patch)
tree8c314cc7c549846a1850b3be21838135950c5da7 /BlankConsoleLab/cst116-lab2-wilson.cpp
parentsimple changes (diff)
downloadcst116-lab2-jacobdw22-30f52b1c77d2558838f236596dc48ea8209f921f.tar.xz
cst116-lab2-jacobdw22-30f52b1c77d2558838f236596dc48ea8209f921f.zip
simple changes
Diffstat (limited to 'BlankConsoleLab/cst116-lab2-wilson.cpp')
-rw-r--r--BlankConsoleLab/cst116-lab2-wilson.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/BlankConsoleLab/cst116-lab2-wilson.cpp b/BlankConsoleLab/cst116-lab2-wilson.cpp
index 9b61ba9..419835a 100644
--- a/BlankConsoleLab/cst116-lab2-wilson.cpp
+++ b/BlankConsoleLab/cst116-lab2-wilson.cpp
@@ -2,6 +2,7 @@
//
#include <iostream>
+#include <iomanip>
#include <stdio.h> /* printf */
#include <math.h> /* pow */
#include <cmath> /* pow */
@@ -47,15 +48,13 @@ Loop2:
}
-float WindChill(float Fahrenheit, float* windspeed) {
+/*float WindChill(float Fahrenheit, float* windspeed) {
- float Chill = 0.0;
-
- Chill = 35.74 + 0.6215 * Fahrenheit - 35.75 * pow(*windspeed, 0.16) + 0.4275 * Fahrenheit * pow(*windspeed, 0.16);
+ double Chill = 35.74 + 0.6215 * Fahrenheit - 35.75 * (pow(*windspeed, 0.16)) + 0.4275 * Fahrenheit * (pow(*windspeed, 0.16));
return Chill;
-}
+}*/
int main()
@@ -81,7 +80,13 @@ int main()
WindSpeedFinder(&windspeed);
- cout << "\n\tThe windchill is: " << WindChill(Fahrenheit, &windspeed) << endl;
+ //cout << "\n\tThe windchill is: " << WindChill(Fahrenheit, &windspeed) << endl;
+
+ float x = 0.16;
+
+ float Chill = 35.74 + 0.6215 * Fahrenheit - 35.75 * (pow(windspeed, x)) + 0.4275 * Fahrenheit * (pow(windspeed, x));
+
+ cout << Chill << endl;
}