Võrrandid kuni 1000 online: a + x = b

'; // Math.floor(Math.random() * (max - min + 1)) + min; } function xplusminus(){ randzeroone=Math.floor( Math.random( ) *2 ); if (randzeroone==1){znak='+';}else{znak='-';} rando=Math.floor(Math.random() * (899 - 101 + 1)) + 101; if (znak==='+'){otvety=Math.floor(Math.random() * (1000 - rando + 1)) + rando; document.getElementById("primer").innerHTML='x '+znak+' '+rando+' = '+otvety; otvet=otvety-rando; } else{otvety=Math.floor(Math.random() * (1000 - rando - 7 + 1)) + 7; document.getElementById("primer").innerHTML='x '+znak+' '+rando+' = '+otvety; otvet=otvety+rando; } } function plusminusx(){ randzeroone=Math.floor( Math.random( ) *2 ); if (randzeroone==1){znak='+';}else{znak='-';} rando=Math.floor(Math.random() * (1000 - 101 + 1)) + 101; if (znak==='+'){otvety=Math.floor(Math.random() * (1000 - rando + 1)) + rando; document.getElementById("primer").innerHTML=rando+' '+znak+' x = '+otvety; otvet=otvety-rando; } else{otvety=Math.floor(Math.random() * (rando - 7 + 1)) + 7; document.getElementById("primer").innerHTML=rando+' '+znak+' x = '+otvety; otvet=rando-otvety; } } function create_primer(){ document.getElementById("eqv").value=''; sluchfun=Math.floor( Math.random( ) *2 ); if (sluchfun==0){xplusminus();}else{plusminusx();} }


a - x = b 





Comments are closed.