multiplication table in java || any number of multiplication with range - CodeTextPro | Web Tutorial | Technology

CodeTextPro.com Provides - Web design, Technology gyan, Digital marketing, Online earnings, Seo, Adsense, Technology news, Motivation and inspiration, Latest Technology Affairs, Gadgets, Blogging

Wednesday, January 9, 2019

multiplication table in java || any number of multiplication with range

Multiplication Table

<html>
<head>

<title> java tutorial...</title>
<style type="text/css">
#d1
{
top:80px;
left:400px;
width:30%;
height:50%;
background-color:skyblue;
border: 2px black solid;
color:brown;
padding-left:20px;
overflow:scroll;
}
</style>
<script type="text/javascript">
function mult()
{
var x=parseInt(document.getElementById("t1").value);
var n=parseInt(document.getElementById("t2").value);


for(var i=1;i<=n;i++)
    {
      var s=x*i;
    
document.getElementById("d1").innerHTML+= x+" * "+i+" = "+s+"<br>";
}
}
</script>
</head>
<body>
<table>
<tr>
<td> 
Enter Number: <input type="text" size="15" id="t1"/><br> 
Enter Range : <input type="text" size="15" id="t2"/>
<input type="button" value="ok" onclick="mult()"/>
</td></tr>
</table>
<div id="d1">
</div>
</body>
</html>


Output:
case1:



case2:


case3:



No comments:

Post a Comment