Guest User

Untitled

a guest
Dec 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. function calcul(chiffre1, chiffre2)
  2. {
  3. var tab[17];
  4. var resultat;
  5. var ptr=document.forms[0];
  6. var chiffre1;
  7. var chiffre2;
  8. var add_sous;
  9.  
  10. for(int i =1; i<19; i++)
  11. {
  12. chiffre1 = math.random()*25;
  13. chiffre2 = math.random()*25;
  14.  
  15. if(i < 7)
  16. {
  17. ptr.serie.value = 1;
  18.  
  19. function addition(chiffre1, chiffre2)
  20. {
  21. resultat = chiffre1 + chiffre2;
  22.  
  23. if(ptr.reponse.value = resultat)
  24. tab[i] = resultat;
  25.  
  26. setInterval(«addition», 5000)
  27. }
  28. }
  29.  
  30. else if(i>6 && i<13)
  31. {
  32. ptr.serie.value = 2;
  33.  
  34. function soustraction(chiffre1, chiffre2)
  35. {
  36. resultat = chiffre1 - chiffre2;
  37.  
  38. if(ptr.reponse.value = resultat)
  39. tab[i] = resultat;
  40.  
  41. setInterval(«soustration», 5000)
  42. }
  43. }
  44.  
  45. else if(i>12 && i<19)
  46. {
  47. add_sous = math.random()*1;
  48. if(add_sous = 0)
  49. add_sous = +;
  50. if(add_sous = 1)
  51. add_sous = -;
  52.  
  53. ptr.serie.value = 3;
  54.  
  55. function lesDeux(chiffre1, chiffre2)
  56. {
  57. resultat = chiffre1 add_sous chiffre2;
  58.  
  59. if(ptr.reponse.value = resultat)
  60. tab[i] = resultat;
  61.  
  62. setInterval(«lesDeux», 5000)
  63. }
  64. }
  65. }
  66. }
Add Comment
Please, Sign In to add comment