1. Input: Take the Celsius temperature as input.
  2. Conversion Formula: Use the following formula to convert Celsius to Fahrenheit:
  3. makefile
    Fahrenheit = (Celsius * 9/5) + 32;
  4. Calculation: Substitute the input Celsius temperature into the formula to calculate the equivalent Fahrenheit temperature.
  5. Output: Display or return the calculated Fahrenheit temperature.


Code Examples

#1 Code Example- Celsius to Fahrenheit

Code - Javascript Programming

// program to convert celsius to fahrenheit
// ask the celsius value to the user 
const celsius = prompt("Enter a celsius value: ");

// calculate fahrenheit
const fahrenheit = (celsius * 1.8) + 32

// display the result
console.log(`${celsius} degree celsius is equal to ${fahrenheit} degree fahrenheit.`);
Copy The Code & Try With Live Editor


Enter a celsius value: 55
55 degree celsius is equal to 131 degree fahrenheit.


Javascript Programing Example to Convert Celsius to Fahrenheit-DevsEnv

JavaScript Practice Example #3 - Assign 3 Variables and Print Good Way