Thursday, October 29, 2015

Yard To Feet Converter in JavaScript

A simple program that I wrote in JavaScript that will ask the user to enter how many yards and then our program will covert the value given by the user in yard into its feet equivalent.

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>Yard To Feet Converter</title>
</head>
<style>
h3 {
   font-family:arial;
   };
</style>
<body>
  <script>
    var yard = parseInt(prompt("How Many Yards : "));
var solve_feet=(yard * 3);

document.write("<h3> Yard To Feet Converter</h3>");
document.write("<font face='arial' size='4'>");
    document.write(" The equivalent  of " + yard + " yard(s)");
document.write(" is " + solve_feet + " feet(s).</font><br>");
document.write("<h3> End of Program </h3>");
</script>
</body>
</html>

No comments:

Post a Comment