Suriin ang malawak na saklaw ng mga paksa sa IDNStudy.com. Tuklasin ang malawak na hanay ng mga paksa at makahanap ng maaasahang sagot mula sa mga bihasang miyembro ng aming komunidad.

what is a code for creating 10 random math questions in html? ​

Sagot :

Answer:

You can generate random numbers, do the math to get the answer your expect, and then compare your expected answer with the actual answer of the user :

var a = Math.floor(Math.random() * 10); // A number between 0 and 10

var b = Math.floor(Math.random() * 10); // Another number between 0 and 10

var expectedAnswer = a + b;

var answer = prompt(a + " + " + b);

if (answer == expectedAnswer)

alert('Good job !');

else

alert('Wrong answer :()');

Explanation:

hope this helps. it's about complicated