0
33kviews
Write a JavaScript to write out the multiplication table for the no. 5 from 1 to 20 using while loop.
1 Answer
1
10kviews

Program :

<!DOCTYPE html>
<html>
<head>
<title>Multiplication Table</title>
</head>
<body>
<h3>Multiplication Table For Number 5</h3>
<script type ="text/javascript">
var  t=5;
var  i=1;
while(i<=20)
{
document.write(t+  "  X  "  +i+  "  =  "  +i*t+   "<br>");
i++;
}
</script>
</body>
</html>
Please log in to add an answer.