Page

Program to table of any number in java script

<html>
<head><h2><center>program to table of any number</h2></center></head>
<body>
<script type="text/javascript">
n=parseInt(prompt("enter the number of which we have to print the table"," "));
document.write("table of "+n+"  is  =>"+"<br>");
for(i=1;i<=10;i++)
{
m=n*i;
document.write(n+"*"+i+" =   "+m+"<br>");
}
</script>
</body>
</html>

No comments:

Post a Comment