Monday, August 30, 2021

Multiplication Table in AngularJS

 Machine Problem

Write a program that will ask user to give the column and row value and then the program will generate a multiplication table based on the  given column and row value by the user.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.




Program Listing

<!-- index.htm

  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

  Date     : July 24, 2021  Saturday 10:37 AM

  Place    : Bacolod City, Negros Occidental

  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com

  Email    : jakerpomperada@gmail.com

 -->

<html>

  <head>

    <title>Multiplication Table Creator in AngularJS</title>

  <script type="text/javascript" src="angular.min.js"></script>

    <script>

    var myApp=angular.module("myModule",[]);

    myApp.controller("Create_Table",function($scope) {

    $scope.MultiplicationTable=function()

    {

    

      var x=1;

      var output = "<table border='1' align='center' width='500' cellspacing='0'cellpadding='5'>";

      for(y=1;y<=$scope.rows;y++)

      {

      output = output + "<tr>";

        while(x<=$scope.column)

        {

       output = output + "<td align='center'>" + y*x + "</td>";

        x = x+1;

      }

       output = output + "</tr>";

       x = 1;

    }

    output = output + "</table>";

    document.write("<style> body { font-family: arial; font-size: 16px;  font-weight: bold; }; </style>");

    document.write("<br><h3 align='center'>Multiplication Table in AngularJS</h3>");

    document.write(output);

    }

    });

     </script>

 </head>

 <style>

body {

font-family: arial;

font-size: 25px;

font-weight: bold;

}

</style>

 <body ng-app="myModule" ng-controller="Create_Table">

  <h3>Multiplication Table Creator in AngularJS</h3>

 <div>

  <table border="0">

  <tr>

  <td>

  Enter Your Row Value  </td>

       <td>

        &nbsp;&nbsp;&nbsp;&nbsp;

         <input type="number" ng-model="rows"/>

       </td>

      <tr>

  <td>

  Enter Your Column Value  </td>

       <td>

        &nbsp;&nbsp;&nbsp;&nbsp;

         <input type="number" ng-model="column"/>

       </td>   

       </tr>

       <tr>

         <td>&nbsp;&nbsp;&nbsp;</td>

        </tr>

      <tr>

      <td colspan="5">

      <input type="button" ng-click="MultiplicationTable()"

          title="Click here to generate a multiplication table."

      value="Create Multiplication Table"/>

      </td>

      </tr>

      </table>

     </div><br>

       </div>

  </body>

</html>


3 comments: