a = Math.random();
b= Math.random();
az = Math.round(a);
bz = Math.round(b);
var chooseoperator = ['+','-','*','/'];
var operator = chooseoperator[Math.floor(Math.random() *chooseoperator.length)];
var final=az+operator+bz;
alert(final);
So the computer alerts,"1-0" or something similar. How can I make the computer solve it?
Aucun commentaire:
Enregistrer un commentaire