// OUTPUT // Please enter a temperature between -80 to 121 degrees fahrenheit, or -62 and 49.5 degrees celsius. Example entries: -32.3 F, 27.8 C -32 Z Invalid temperature system. Please try again with C or F as your unit. -81 F Temperature in fahrenheit must be between -80 and 121 degrees. Please try again. 122 F Temperature in fahrenheit must be between -80 and 121 degrees. Please try again. -63 C Temperature in celsius must be between -62 and 49.5 degrees. Please try again. 50 C Temperature in celsius must be between -62 and 49.5 degrees. Please try again. 32 F Next, enter a wind speed between 0 and 231mph. You do not need to include a unit. 11.3 Conversions for 32F with wind speed 11.3MPH. Celsius Fahrenheit Wind Speed Wind Chill (F) Wind Chill (C) 0.00 32.00 11.30 23.10 -4.95 // PSEUDOCODE // DEFINE FUNCTION THAT RETURNS A FLOAT VALUE ConvertTemperature(float temperature, char temperatureSystem){ IF temperatureSystem is C{ RETURN (temperature * 1.8) + 32; } ELSE IF temperatureSystem is F{ RETURN (temperature -32) / 1.8; } } DEFINE FUNCTION THAT RETURNS A BOOL VALUE CheckWindSpeed(reference float value){ IF value IS LESS THAN 0 OR value IS GREATER THAN 231{ print "Invalid wind speed. Please enter a number between 0 and 231"; RETURN FALSE; } OTHERWISE RETURN TRUE; } DEFINE FUNCTION THAT RETURNS A FLOAT VALUE GetWindChill(){ RETURN (35.74 + (0.6215 * temperatureFahrenheit) + (windSpeed^0.16 * (0.4275 * temperatureFahrenheit) - 35.75)); } MAIN PROGRAM(){ INITIALIZE CHAR choice TO BE 'Y' WHILE choice IS Y, DO THIS { PRINT "Please enter a temperature between -80 to 121 degrees fahrenheit, or -62 and 49.5 degrees celsius."; PRINT "Example entries: -32.3 F, 27.8 C"; INITIALIZE FLOAT temperatureInput; INITIALIZE CHAR temperatureSystem; INITIALIZE BOOL validEntires AT false; DO AT LEAST ONCE{ PUT INPUT INTO temperatureInput AND temperatureSystem; IF temperatureSystem IS 'C' { IF temperatureInput IS LESS THAN -62 OR temperatureInput IS GREATER THAN 49.5{ PRINT "Temperature in celsius must be between -62 and 49.5 degrees. Please try again."; }OTHERWISE{ SET validEntries TO true; SET temperatureCelsius TO temperatureInput; SET temperatureFahreneheit TO RETURN VALUE FROM ConvertTemperature WITH PARAMETERS temperatureINPUT and 'C'; } } OTHERWISE IF temperatureSystem IS 'F' { IF temperatureInput IS LESS THAN -80 OR temperatureInput IS GREATER THAN 121{ PRINT "Temperature in fahrenheit must be between -80 and 121 degrees. Please try again."; }OTHERWISE{ SET validEntries TO true; SET temperatureFahrenheit TO temperatureInput; SET temperatureCelsius TO RETURN VALUE FROM ConvertTemperature WITH PARAMETERS temperatureINPUT and 'F'; } }WHILE validEntries IS false; PRINT "Next, enter a wind speed between 0 and 231mph. You do not need to include a unit."; RESET validEntries BY SETTING IT TO false; DO AT LEAST ONCE { PUT INPUT INTO windSpeed; SET validEntries TO RETURN VALUE FROM CheckWindSpeed WITH PARAMETER windSpeed; }WHILE validEntires IS false; SET windChillFahrenheit TO RETURN VALUE FROM GetWindChill; SET windChillCelsius TO RETURN VALUE FROM ConvertTemperature WITH PARAMETERS windChillFahrenheit AND 'F'; PRINT "Conversions for [TEMPERATURE INPUTTED BY USER] with wind speed [WIND SPEED ENTERED BY USER]MPH."; PRINT [FORMATTED TABLE WITH HEADERS FOR TEMPERATURE IN CELSIUS AND FAHRENHEIT, WIND SPEED, AND CALCULATED WIND CHILL]; PRINT "If you would like to input another set of data, please enter 'Y'"; SET choice TO INPUT; } END PROGRAM; }