summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnibal LopezBonilla <[email protected]>2022-11-09 23:12:30 -0800
committerAnibal LopezBonilla <[email protected]>2022-11-09 23:12:30 -0800
commita341222b310ab87a0af7dbdeff2ef1eb7a3e5453 (patch)
tree2d794703bfefd3a7ad0d21326dfe5f44e94cecb4
parentPush 7 (diff)
downloadcst116-lab2-lopez-bonilla-a341222b310ab87a0af7dbdeff2ef1eb7a3e5453.tar.xz
cst116-lab2-lopez-bonilla-a341222b310ab87a0af7dbdeff2ef1eb7a3e5453.zip
Push 8
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp3
-rw-r--r--Lab2 Pseudocode.txt142
2 files changed, 143 insertions, 2 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index df3668c..de91f5f 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -38,8 +38,7 @@ int CeltoFar()
{
cout << "You entered " << Cel << endl;
- Fah = 9 / 5 * Cel + 32; ;
-
+ Fah = 9 / 5 * Cel + 32;
cout << "which is " << Fah << " degrees fahrenheit" << endl;
}
else
diff --git a/Lab2 Pseudocode.txt b/Lab2 Pseudocode.txt
new file mode 100644
index 0000000..f720cdf
--- /dev/null
+++ b/Lab2 Pseudocode.txt
@@ -0,0 +1,142 @@
+using namespace std;
+
+using std::cout;
+using std::cin;
+using std::endl;
+
+//Float Variables declared
+float Cel;
+float Fah;
+float WindChill;
+float WindSpeed;
+
+//Char Variable declared
+char Sel;
+
+function PrintFunctionCF is Declared
+
+Display the Following
+
+(EX. For 32 Degrees f and 90 mph windchill is 10.288)
+
+end of Function
+
+function PrintFunctionFC is Declared
+
+Display the Following
+
+(EX. For 32 Degrees c and 90 kmh windchill is 10.288)
+
+end of Function
+
+Function CeltoFar is introduced
+
+Display The range is between -62 and 49.5
+
+Display Type your temprature in celcius
+Enter Cel (Celcius)
+
+if the Celcius is greater than -62 and 49.5
+
+ Display You Entered (celcius)
+
+ Calculation is done from celcius to fahrenheit (Fah = 9 / 5 * Cel + 32)
+
+ Display which is (fahrenheit) degrees fahrenheit
+else
+ Display Please Try again
+ Display Type your temprature in Celcius:
+ Enter Cel
+
+Display Type the windspeed in mph
+Enter WindSpeed
+
+if the WindSpeed is greater than 0 and 231
+
+ Calculation(WindChill = 35.74 + .6215 * Fah - 35.75
+ * pow(WindSpeed, .16) + .4275 * Fah * pow(WindSpeed, .16))
+
+else
+ Display Please Try again
+ Display Type your windspeed in mph:
+ Enter Windspeed
+
+return Windchill
+return Windspeed
+return Fah
+
+End of function
+
+Function FahtoCel is introduced
+
+Display The range is between -79.6 and 121.1
+
+Display Type your temprature in fahrenheit
+Enter Fah (Fahrenheit)
+
+if the fahrenheit is greater than -79.6 and 121.1
+
+ Display You Entered (fahrenheit)
+
+ Calculation is done from fahrenheit to celcius (Cel = (Fah - 32) * 5 / 9)
+
+ Display which is (Celcius) degrees Celcius
+else
+ Display Please Try again
+ Display Type your temprature in Fahrenheit:
+ Enter Fah
+
+Display Type the windspeed in kmh
+Enter WindSpeed
+
+if the WindSpeed is greater than 0 and 371.758
+
+ Calculation(WindChill = 13.12 + .6215 * Cel - 11.37
+ * pow(WindSpeed, .16) + .3965 * Cel * pow(WindSpeed, .16))
+
+else
+ Display Please Try again
+ Display Type your windspeed in kmh:
+ Enter Windspeed
+
+return Windchill
+return Windspeed
+return Fah
+
+End of function
+
+menuChoice is introduced
+
+ char CH is set to equal to Sel
+
+ if the CH is equal to C or c
+ CeltoFar
+ printFunctionCF
+ else if CH is equal to F or f
+ FahtoCel
+ printFunctionFC
+
+end of Function
+
+welcomeMessageChoice is declared
+
+
+ Display Welcome to the Menu!!
+ while Sel is not equal to 'C' & Sel is not equal to 'c'
+ & Sel is not equal to 'f' & Sel is not equal to 'F'
+
+ Display Cel or Fah
+ Display Please type C or F:
+ Enter Sel
+
+ menuChoice
+ return Sel;
+
+End of Function
+
+main function is introduced
+ welcomeMessageChoice
+ menuChoice
+end of function
+
+