Advertisement
476179

7.1Act4

Nov 14th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.46 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="utf-8">
  5.     <title>ex1.loops</title>
  6. </head>
  7.    
  8. <body>
  9. <script>
  10.    var num1, num2, b;
  11.    num1 = parseFloat(prompt("Which multiplication table would you like?"));
  12.    num2 = parseFloat(prompt("How high do you want to go?"));
  13.     b = 1;
  14.    
  15.     while(b <= num2)
  16.    {
  17.    document.write(num1 + " x "+ b + " = " + (b * num1)+ "<br>");
  18.       b ++;
  19.     }
  20.    
  21. </script>
  22. </body>
  23.  
  24. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement