![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
07/01/2003, 06:34
|
![Avatar de DanielRey](http://static.forosdelweb.com/customavatars/avatar4516_1.gif) | Usuario no validado | | Fecha de Ingreso: enero-2001 Ubicación: Mendoza
Mensajes: 630
Antigüedad: 24 años Puntos: 1 | |
Probá con esta otra:
function calcula() {
var A = 329;
alert(A);
do {
total=0;
B = A.toString(10)
for(i = 0; i < B.length; i++) {
mem = new Number(B.substring(i, i+1));
total = eval(total + mem);
alert("Iter: " + i + "\nMem: " + mem + "\nTotal: " + total)
}
A=total;
}
while (total.toString(10).length > 1)
alert(total);
} |