For Advertisements on this blog Contact Us at developgram@gmail.com or +91-9923438816

Simple Programming Tutorials For Beginners

Wednesday, April 19, 2017

Square of Number

<html>
<head>
  <script>
    function square(num)
    {
      var result = parseInt(num * num);

      document.write("Square of " + num + " is " + result);
    }
  </script>
</head>
<body>
  <script>
    var n = parseInt(prompt("Enter an integer"));

    square(n);
  </script>
</body>
</html>


No comments:

Post a Comment

SEARCH THIS BLOG