summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnibal LopezBonilla <[email protected]>2022-11-09 22:05:17 -0800
committerAnibal LopezBonilla <[email protected]>2022-11-09 22:05:17 -0800
commit58d8c62835309376300fd9187bd518725f8e1494 (patch)
tree336a7abbee1fa08ecf3d70abcda6f3cee9988395
parentPush 3 (diff)
downloadcst116-lab2-lopez-bonilla-58d8c62835309376300fd9187bd518725f8e1494.tar.xz
cst116-lab2-lopez-bonilla-58d8c62835309376300fd9187bd518725f8e1494.zip
Push6
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index babd152..c330d51 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -31,6 +31,7 @@ void printFunctionFC()
//Celcius to Fahrenheit
int CeltoFar()
{
+ cout << "The range is between -62 and 49.5" << endl;
cout << "Type your temprature in Celcius: ";
cin >> Cel;
cout << endl;
@@ -73,25 +74,20 @@ int CeltoFar()
}
int FahtoCel()
{ //Fahrenheit to Celcius
- while (Fah > -79.6 && Fah <121.1)
- {
+
+ cout << "The range is between -79.6 and 121.1" << endl;
cout << "Type your temprature in Fahrenheit: ";
cin >> Fah;
cout << endl;
- }
- if (Fah <= -79.6 || Fah >= 121.1)
- {
+
cout << "You entered " << Fah << endl;
- Cel = (Fah - 32) * 5 / 9;
- cout << "which is " << Cel << " degrees celcius" << endl;
- }
+ Cel = (Fah - 32) * 5 / 9;
- while (WindSpeed < 0 && WindSpeed > 371)
- {
+ cout << "which is " << Cel << " degrees celcius" << endl;
+
cout << "Type the windspeed in Km " << endl;
cin >> WindSpeed;
- }
//windspeed in Kilometers
WindChill = 13.12 + .6215 * Cel - 11.37 * pow(WindSpeed, .16) + .3965 * Cel * pow(WindSpeed, .16);