topical media & game development

talk show tell print

basic-javascript-02-ch2-examp6.htm / htm



  <html>
  <body>
  
  <script language="JavaScript" type="text/javascript">
  
  // Equation is @@dgC = 5/9 (@@dgF - 32).
  
  var degFahren = prompt("Enter the degrees in Fahrenheit",50);
  var degCent;
  
  degCent = 5/9 * (degFahren - 32);
  
  alert(degFahren + "\xB0 Fahrenheit is " + degCent + "\xB0 centigrade");
  
  </script>
  
  </body>
  </html>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.