aboutsummaryrefslogtreecommitdiff
path: root/BlankConsoleLab/CST116-Lab2-Pseudocode-Preston.txt
diff options
context:
space:
mode:
authorprestonderek <[email protected]>2022-11-06 19:23:07 -0800
committerprestonderek <[email protected]>2022-11-06 19:23:07 -0800
commitcfe4e73c1f45caaacfd092e6fc292d2f785a846f (patch)
tree13e7f071f44a18bcdfcab490e0d7cfb2d99c18f4 /BlankConsoleLab/CST116-Lab2-Pseudocode-Preston.txt
parentAdd files via upload (diff)
downloadcst116-lab2-prestonderek-cfe4e73c1f45caaacfd092e6fc292d2f785a846f.tar.xz
cst116-lab2-prestonderek-cfe4e73c1f45caaacfd092e6fc292d2f785a846f.zip
Commit all for finish of project
Diffstat (limited to 'BlankConsoleLab/CST116-Lab2-Pseudocode-Preston.txt')
-rw-r--r--BlankConsoleLab/CST116-Lab2-Pseudocode-Preston.txt81
1 files changed, 81 insertions, 0 deletions
diff --git a/BlankConsoleLab/CST116-Lab2-Pseudocode-Preston.txt b/BlankConsoleLab/CST116-Lab2-Pseudocode-Preston.txt
new file mode 100644
index 0000000..5784962
--- /dev/null
+++ b/BlankConsoleLab/CST116-Lab2-Pseudocode-Preston.txt
@@ -0,0 +1,81 @@
+Pseudocode for Lab 2
+
+float cel
+float far
+float mph
+float chill
+float newFar
+
+const min/max for far, cel, mph
+
+string check
+const string celcheck
+
+float celtofar(cel)
+float getParam(far&, mph&)
+float windchill(far, mph)
+float getMPH(mph&)
+
+main begin
+ far = 0
+ cel = 0
+ mph = 0
+
+ print do you want to enter cel or far
+ input check
+
+ if check == celcheck
+ celtofar(cel)
+ far = newFar
+ getMPH(mph)
+ else
+ getParam(far, mph)
+
+ windchill(far, mph)
+
+ print you entered + far + F
+ print for + far + degrees F and + mph + MPH wind speed + the windchill is + chill
+
+end main funciton
+
+float getParam(float& far, float& mph)
+ print enter far temp
+ print must be between farmin and farmax
+ input far
+ while (far < farmin OR far > farmax)
+ print enter far temp
+ print must be between farmin and farmax
+ input far
+ print enter wind speed in mph
+ print must be between mphmin and mphmax
+ input mph
+ while (mph < mphmin OR mph > mphmax)
+ print enter wind speed in mph
+ print must be between mphmin and mphmax
+ input mph
+ return far, mph
+
+float celtofar(float cel)
+ print enter your cel temp
+ print must be between celmin and celmax
+ input cel
+ while (cel < celmin OR cel > celmax)
+ print enter your cel temp
+ print must be between celmin and celmax
+ input cel
+ newFar = (9/5) x cel + 32
+ return newFar
+
+float getMPH(float& mph)
+ print enter wind speed in mph
+ print must be between mphmin and mphmax
+ input mph
+ while (mph < mphmin OR mph > mphmax)
+ print enter wind speed in mph
+ print must be between mphmin and mphmax
+ input mph
+ return mph
+
+float windchill(float far, float mph)
+ chill = 35.74 + (.6215 * far) - (35.75 * mph^.16) + (.4275 * mph^.16)
+ return chill \ No newline at end of file