The program is written to convert the temperature from Fahrenheit to Celsius. The Fahrenheit temperature is taken as input from the user. The relationship between Celsius and Fahrenheit is:
If the given Fahrenheit temperature is 100 then the Celsius temperature will be calculated:
c = (5*(100-32))/9.
INPUT: Fahrenheit Temperature
OUTPUT: Equivalent Celsius temperature
Step 1: [Taking the input]
Read f [Fahrenheit temperature]
Step 2: [Converting the Fahrenheit temperature to Celsius]
[Printing the temperature in Celsius]
Print "The f F is c C"
Step 3: Stop.
The time complexity of this program is O(1) as it requires a constant time to execute.
The space complexity of this program is O(1) as it requires a constant amount of memory space to execute for any given input.