diff options
Diffstat (limited to 'CST116-Lab2-Smith-Pseudo-Code.txt')
| -rw-r--r-- | CST116-Lab2-Smith-Pseudo-Code.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/CST116-Lab2-Smith-Pseudo-Code.txt b/CST116-Lab2-Smith-Pseudo-Code.txt new file mode 100644 index 0000000..c8c7918 --- /dev/null +++ b/CST116-Lab2-Smith-Pseudo-Code.txt @@ -0,0 +1,24 @@ +Temp_Conversion: +1) Multiply the temperature by 1.8 then add 32 +2) Return the temperature + +Temp_Speed_Output: +1) Output the temperature in Fahrenheit to the user +2) Output the wind speed to the console + +Wind_Chill: +1) Calculate the wind chill using the temperature and wind speed variables +2) Return the wind chill value + +Main: +1) Get the input from the user of 'F' for Fahrenheit or 'C' for Celsius +2) If the input does not match 'F' or 'C' keep asking the user for an input until one of those options is input +3) If the user's input is 'F' get the value for the temperature between the set const values (-80 to 121) +4) If the user's input is 'C' get the value for the temperature between the set const values (-61 to 49.5) +5) While the user's input isn't between the set const values, keep asking until the user inputs a value between the const values +6) Get the user's input for wind speed between the set const values (0 to 231) +7) While the user's input isn't between the set const values, keep asking until the user inputs a value between the const values +8) If the initial user input was 'C' call the Temp_Conversion function using the variable 'temperature' +9) Call the Temp_Speed_Output function using the variables 'temperature' and 'wind_speed' +10) Set a variable to be the output of the Wind_Chill function using the variables 'temperature' and 'wind_speed' +11) Output the wind chill to the console
\ No newline at end of file |