Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function calcul(chiffre1, chiffre2)
- {
- var tab[17];
- var resultat;
- var ptr=document.forms[0];
- var chiffre1;
- var chiffre2;
- var add_sous;
- for(int i =1; i<19; i++)
- {
- chiffre1 = math.random()*25;
- chiffre2 = math.random()*25;
- if(i < 7)
- {
- ptr.serie.value = 1;
- function addition(chiffre1, chiffre2)
- {
- resultat = chiffre1 + chiffre2;
- if(ptr.reponse.value = resultat)
- tab[i] = resultat;
- setInterval(«addition», 5000)
- }
- }
- else if(i>6 && i<13)
- {
- ptr.serie.value = 2;
- function soustraction(chiffre1, chiffre2)
- {
- resultat = chiffre1 - chiffre2;
- if(ptr.reponse.value = resultat)
- tab[i] = resultat;
- setInterval(«soustration», 5000)
- }
- }
- else if(i>12 && i<19)
- {
- add_sous = math.random()*1;
- if(add_sous = 0)
- add_sous = +;
- if(add_sous = 1)
- add_sous = -;
- ptr.serie.value = 3;
- function lesDeux(chiffre1, chiffre2)
- {
- resultat = chiffre1 add_sous chiffre2;
- if(ptr.reponse.value = resultat)
- tab[i] = resultat;
- setInterval(«lesDeux», 5000)
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment