summaryrefslogtreecommitdiff
path: root/Lab2 PseudoCode.txt
blob: f0bfd5222d28795901de6ce1afaefa161ff6d073 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
define variables UserInputTemp, WindSpeed, CorF, and Windchill
call function GetTemp
display "Please enter a temperature in Celcius or Farenheit"
store input into UserInputTemp
display "If you entered a temperature in Celcius please enter 'C' and if you entered a temperature in Farenheit please enter 'F'. "
If the input is not C or F
display "Please enter either 'C' or 'F'
if the input is F 
verify value is between -80 and 121
if its not display "Please enter a temperature between -80 and 121."
display "Please enter a temperature in Farenheit: "
take input for UserInputTemp
if the input is C 
verify value is between -62 and 49.5
if its not display "Please enter a temperature between -62 and 49.5."
display "Please enter a temperature in Celcius: "
take input for UserInputTemp
display "The temperature you entered is ", call function CelciusToFarenheit(UserInputTemp), " degrees in Farenheit."
return UserInputTemp
call function GetWindSpeed
display "Please enter a wind speed in Miles Per Hour: "
take input for WindSpeed
verify WindSpeed is between 0 and 231. 
if it's not display "Please enter a wind speed between 0 and 231 Miles Per Hour", "Please enter a wind speed in Miles Per Hour: "
retake input for WindSpeed
call function WindChill
Do the math to calculate windchill and store it in variable windchill
display "Based on your inputs of ",CelciusToFarenheit(UserInputTemp), " and ", WindSpeed, ", the wind chill is ", windchill, "."