J
John
Hi,
Would appreciate any help in in generalizing the following so that one
can input from a form any number one wishes.
var s;
var t;
var u;
var v;
var w;
var x;
var y;
var z;
var out = "";
function count() {
for (s=0; s<2; s++) {
for (t=0; t<2; t++) {
for (u=0; u<2; u++) {
for (v=0; v<2; v++) {
for (w=0; w<2; w++) {
for (x=0; x<2; x++) {
for (y=0; y<2; y++) {
for (z=0; z<2; z++) {
var tot =z*1+y*2+x*4+w*8+v*16+u*32+t*64+s*128;
out = out + "\n " + tot;
}
}
}
}
}
}
}
}
window.document.myform.value = out;
}
Thanks.
Would appreciate any help in in generalizing the following so that one
can input from a form any number one wishes.
var s;
var t;
var u;
var v;
var w;
var x;
var y;
var z;
var out = "";
function count() {
for (s=0; s<2; s++) {
for (t=0; t<2; t++) {
for (u=0; u<2; u++) {
for (v=0; v<2; v++) {
for (w=0; w<2; w++) {
for (x=0; x<2; x++) {
for (y=0; y<2; y++) {
for (z=0; z<2; z++) {
var tot =z*1+y*2+x*4+w*8+v*16+u*32+t*64+s*128;
out = out + "\n " + tot;
}
}
}
}
}
}
}
}
window.document.myform.value = out;
}
Thanks.