Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>6</title>
- </head>
- <body>
- <script>
- var m2,m3,a1,a2,a3,a4,a5,a6,a7;
- a1 = (Math.random()*100);
- a2 = (Math.random()*100);
- a3 = a1.toFixed(0)
- a4 = a2.toFixed(0)
- var m1 = parseFloat(prompt("What is the sum of these two numbers?"+ a3+ "x"+a4));
- a5 = a3 * a4;
- if (m1 > a5 )
- {
- alert("correct!");
- }
- else
- {
- alert("incorrect!");
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment