Entraînement au calcul mental
Module pour le développement de ses capacités de calcul mental, basé sur des opérations aléatoires.
JavaScript
while(true) {
var a1 = parseInt(Math.floor((100) * Math.random() + 2));
var a2 = parseInt(Math.floor((100) * Math.random() + 2));
var b1 = parseInt(Math.floor((100) * Math.random() + 2));
var b2 = parseInt(Math.floor((100) * Math.random() + 2));
var c1 = parseInt(Math.floor((100) * Math.random() + 2));
var c2 = parseInt(Math.floor((100) * Math.random() + 2));
var d1 = parseInt(Math.floor((100) * Math.random() + 2));
var d2 = parseInt(Math.floor((100) * Math.random() + 2));
var e1 = parseInt(Math.floor((100) * Math.random() + 2));
var e2 = parseInt(Math.floor((100) * Math.random() + 2));
var f1 = parseInt(Math.floor((100) * Math.random() + 2));
var f2 = parseInt(Math.floor((100) * Math.random() + 2));
var g1 = parseInt(Math.floor((100) * Math.random() + 2));
var g2 = parseInt(Math.floor((100) * Math.random() + 2));
var h1 = parseInt(Math.floor((100) * Math.random() + 2));
var h2 = parseInt(Math.floor((100) * Math.random() + 2));
var i1 = parseInt(Math.floor((100) * Math.random() + 2));
var i2 = parseInt(Math.floor((100) * Math.random() + 2));
var j1 = parseInt(Math.floor((100) * Math.random() + 2));
var j2 = parseInt(Math.floor((100) * Math.random() + 2));
var operators = ["+", "-", "×", "/"];
var count = 0;
alert("Bienvenue ! Ce programme permet de s'entraîner au calcul mental, avec 10 calculs à résoudre de tête, à chaque fois aléatoires. Pour avancer, cliquer OK.\n\nCONSIGNES :\n - pour les divisions, penser à arrondir le résultat au dixième ;\n - utiliser la virgule pour les nombres comprenant une décimale (et pas le point) ;\n - dans le cas où la solution est négative, ne pas mettre d'espace entre le signe \" - \" et la solution ;\n - si le résultat se termine par 5 centièmes, arrondir au dixième supérieur.\n\nBonne chance !");
var operator = operators[Math.floor(Math.random() * 4)];
var calc1 = "Calcul N°1\n" + a1 + " " + operator + " " +...