476179

Untitled

Oct 31st, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>6</title>
  6. </head>
  7.  
  8. <body>
  9. <script>
  10.  
  11.  
  12. var m2,m3,a1,a2,a3,a4,a5,a6,a7;
  13. a1 = (Math.random()*100);
  14. a2 = (Math.random()*100);
  15. a3 = a1.toFixed(0)
  16. a4 = a2.toFixed(0)
  17. var m1 = parseFloat(prompt("What is the sum of these two numbers?"+ a3+ "x"+a4));
  18.  
  19. a5 = a3 * a4;
  20.  
  21. if (m1 > a5 )
  22. {
  23. alert("correct!");
  24. }
  25. else
  26. {
  27. alert("incorrect!");
  28. }
  29.  
  30. </script>
  31. </body>
  32.  
  33. </html>
Advertisement
Add Comment
Please, Sign In to add comment