celsius to farheit and farheit to celsius in javascript

technical talkiess
0

 <!DOCTYPE html>

<html>

<body>


<h2>My First JavaScript</h2>


<script>

var celsius = prompt("Enter the Celsius Value",1);


var farheit = (celsius * 1.8 ) + 32;


alert("The farheit of" + farheit + " is the " +celsius +" this celsius ");

// farheit to celsius

var farheit = (celsius -31 )  /1.8;


alert("The farheit of" + farheit + " is the " +celsius +" this celsius ");

</script>


</body>

</html> 


Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)