From 47999da32e2ea8b803f2baeb5d7c775337d44a33 Mon Sep 17 00:00:00 2001 From: DoolyBoi Date: Wed, 9 Nov 2022 21:11:01 -0800 Subject: comments --- BlankConsoleLab/BlankConsoleLab.cpp | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 3acc188..a72039e 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -20,7 +20,12 @@ const float CM = 49.5; const float Wm = 0; const float WM = 231; -//Takes celcius and converts it to fahrenhiet +/* +Function: C_to_F +Input: Celcius(float) +Return: Fahrenheit(float) +Purpose: Converts celius to fahrenheit +*/ float C_to_F(float x) { x *= 1.8; @@ -28,7 +33,12 @@ float C_to_F(float x) return x; } -//Asks user for the "value" of "type" which has to be between "min" and "max" +/* +Function: GetUserInputs +Input: variable(float), min value(float) max value(float), variable's type(string) +Return: None +Purpose: Ask user for the value of type between min and max +*/ void getUserInputs(float& value, float min, float max, string type) { while (value <= min || value >= max) @@ -39,12 +49,23 @@ void getUserInputs(float& value, float min, float max, string type) } } -//calculates the wind chill and returns it +/* +Function: calculate +Input: MPH(float), degrees F(float) +Return: Wind Chill(float) +Purpose: To calculate wind chill from wind speed and temperature +*/ float calculate(float mph, float degrees) { return (35.74 + (0.6215 * degrees) - (35.75 * pow(mph, 0.16)) + (0.4275 * degrees * pow(mph, 0.16))); } +/* +Function: main() +Input:None +Return:None +Purpose: Ask user what degree they will enter temp in and run functions based off that +*/ int main() { string CorF; -- cgit v1.2.3