![]() |
VOOZH | about |
Given a Temperature C on the Celsius scale, we need to convert it into a Fahrenheit scale.
Examples:
Input: 0
Output: 32
Explanation: Using this Conversion formula T(°F) = T(°C) × 9/5 + 32 . we get temperature on Fahrenheit scale from Celsius.Input: -40
Output: -40
Explanation: Using the Conversion formula T(°F) = (-40)× 9/5 + 32 . So temperature in Fahrenheit is -40
The formula for converting the Celsius scale to the Fahrenheit scale is:
T(°F) = T(°C) × 9/5 + 32
68
Time Complexity: O(1)
Auxiliary Space: O(1)