Java Program to Convert Celsius into Fahrenheit
Celsius scale is a temperature scale that is based on the freezing point of water at 0 °C and the boiling point of water at 100 °C. Fahrenheit scale is a temperature scale that has a freezing point of water at 32 °F and the boiling point of water at 212 °F.
Input : 0
- Initializing value of celsius as 10.0 and Fahrenheit value as 0.0
- Calculate the Fahrenheit using the below formula
- Display Fahrenheit.
Below is the implementation of the above approach:
, fahrenheit =
fahrenheit = (celsius *
" value of temperature in fahrenheit:"
value of temperature in fahrenheit:50.0
Time Complexity: O(1)
Space Complexity: O(1)
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!