Topic: Mathematical
Questions Successfully Completed: 1
1) Convert Celsius To Fahrenheit | Easy |
Convert Celsius To Fahrenheit
Time Complexity : O(1)
Space Complexity : O(1)
Question
Input: C = 32 Output: 89 Explanation: Using the conversion formula of celsius to farhenheit , it can be calculated that, for 32 degree C, the temperature in Fahrenheit = 89.
class Solution
{
public double cToF(int C)
{
return (C * 9/5) + 32;
}
}
Thank you for reading :)