Java script program to enter temperature in Fahrenheit and convert to Celsius

Java script program to enter temperature in Fahrenheit and convert to Celsius

Java script program to enter temperature in Fahrenheit and convert to Celsius

. To convert Fahrenheit to Celsius, subtract 32 from the Fahrenheit temperature and then multiply the result by 5/9.

Formula

				
					let fahrenheit = 285;
let celsius = (fahrenheit - 32) * 5/9;
				
			

Code

				
					   <script>
           let c,f;
          f=parseInt(prompt("Enter f "))
          c=(f-32)*5/9
          alert(c)
    </script>
				
			
Spread the love