diff options
| author | prestonderek <[email protected]> | 2022-11-06 19:23:07 -0800 |
|---|---|---|
| committer | prestonderek <[email protected]> | 2022-11-06 19:23:07 -0800 |
| commit | cfe4e73c1f45caaacfd092e6fc292d2f785a846f (patch) | |
| tree | 13e7f071f44a18bcdfcab490e0d7cfb2d99c18f4 /BlankConsoleLab/CST116-Lab2-Pseudocode-Preston.txt | |
| parent | Add files via upload (diff) | |
| download | cst116-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.txt | 81 |
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 |