summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMusa Ahmed <[email protected]>2022-11-09 20:18:26 -0800
committerMusa Ahmed <[email protected]>2022-11-09 20:18:26 -0800
commit62eaa1d8e9bc4c2d1d34332c4a9239b74858646d (patch)
treea08b438cceb32f6456e80ea2dbc8dcd977492ba6
parentremoved using namespace std (diff)
downloadcst116-lab2-m005a-62eaa1d8e9bc4c2d1d34332c4a9239b74858646d.tar.xz
cst116-lab2-m005a-62eaa1d8e9bc4c2d1d34332c4a9239b74858646d.zip
added comments for each function
-rw-r--r--BlankConsoleLab/CST116-Lab2-Ahmed.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/BlankConsoleLab/CST116-Lab2-Ahmed.cpp b/BlankConsoleLab/CST116-Lab2-Ahmed.cpp
index ad94ed2..8180237 100644
--- a/BlankConsoleLab/CST116-Lab2-Ahmed.cpp
+++ b/BlankConsoleLab/CST116-Lab2-Ahmed.cpp
@@ -13,17 +13,17 @@ using std::cin;
using std::endl;
using std::setprecision;
-// Function to convert from celsius to fahrenheit
+// Function name cToF, inputs a float a, returns a float temp
float cToF(float a) {
float temp = (9.0 / 5) * a + 32;
return temp;
}
-// Function to calculate the windchill
+// Function name windChill, inputs a float d and w by reference, returns a float out
float windChill(float& d, float& w) {
float out = 35.74 + 0.6215 * d - 35.75 * pow(w, 0.16) + 0.4275 * d * pow(w, 0.16);
return out;
}
-// Function to display the entire output, as well as stating if the temperature is in degrees or fahrenheit
+// Function name output, inputs floats d, w, chill, and boolean x, returns a string containing the complete output
string output(float d, float w, float chill, bool x) {
string temp;