Thursday, October 29, 2015

Pound To Kilogram Converter in JavaScript

A simple program that I wrote that will ask the user to enter a value in pound and it will convert into kilogram weight equivalent. The program is very simple and easy to understand.

If you  have some questions please send me an email at jake.r.pomperada@gmail.com and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360.


Sample Program Output


Program Listing

<html>
<head>
  <title>Pound To Kilogram Converter</title>
</head>
<style>
h3 {
   font-family:arial;
   };
</style>
<body>
  <script>
    var pound = parseInt(prompt("How Many Pound(s) : "));
var solve_kilogram=(pound * 0.453592);

document.write("<h3> Pound To Kilogram Converter</h3>");
document.write("<font face='arial' size='4'>");
    document.write(" The equivalent  of " + pound + " pound(s)");
document.write(" is " + solve_kilogram.toFixed(2) + " kilogram(s).</font><br>");
document.write("<h3> End of Program </h3>");
</script>
</body>
</html>

1 comment:

  1. KgLb Converter Units, is a fast and simple app to convert pounds to kilograms.

    https://play.google.com/store/apps/details?id=com.anazco.juan.kglbconverterunits&hl=en

    ReplyDelete