From 62eaa1d8e9bc4c2d1d34332c4a9239b74858646d Mon Sep 17 00:00:00 2001 From: Musa Ahmed Date: Wed, 9 Nov 2022 20:18:26 -0800 Subject: added comments for each function --- BlankConsoleLab/CST116-Lab2-Ahmed.cpp | 6 +++--- 1 file 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; -- cgit v1.2.3