trying to come up with a loop for generalized the following codes

else if ( step==0&&step<(n2-1) ) {

//scaffoldtxt="Largest number that can multiply "+ i1 +" that is < "+getNumber(i3,i1)+" ? ";

//nmode = false;

scaffoldtxt="Largest number that can multiply "+ i1 +" that is =< "+tv[1]+" ? ";

//nmode = true;

scaffoldtxt1="Largest number that can multiply "+ i1 +"*"+(int)(Math.pow(10,(int)(Math.log(i2/10)/Math.log(10.)+1.e-8)))+" that is equal or less than "+txt[1]+" ? ";

}

if ( step==1&&step<(n2-1) ) {

//scaffoldtxt="Largest number that can multiply "+ i1 +" that is < "+getNumber(i3,i1)+" ? ";

scaffoldtxt="Largest number that can multiply "+ i1 +" that is =< "+tv[3]+" ? ";

scaffoldtxt1="Largest number that can multiply "+ i1 +"*"+(int)(Math.pow(10,(int)(Math.log(i2/100)/Math.log(10.)+1.e-8)))+" that is equal or less than "+txt[3]+" ? ";

}

if ( step==2&&step<(n2-1) ) {

//scaffoldtxt="Largest number that can multiply "+ i1 +" that is < "+getNumber(i3,i1)+" ? ";

scaffoldtxt="Largest number that can multiply "+ i1 +" that is =< "+tv[5]+" ? ";

scaffoldtxt1="Largest number that can multiply "+ i1 +"*"+(int)(Math.pow(10,(int)(Math.log(i2/1000)/Math.log(10.)+1.e-8)))+" that is equal or less than "+txt[5]+" ? ";

}

if ( step==3&&step<(n2-1) ) {

//scaffoldtxt="Largest number that can multiply "+ i1 +" that is < "+getNumber(i3,i1)+" ? ";

scaffoldtxt="Largest number that can multiply "+ i1 +" that is =< "+tv[7]+" ? ";

scaffoldtxt1="Largest number that can multiply "+ i1 +"*"+(int)(Math.pow(10,(int)(Math.log(i2/10000)/Math.log(10.)+1.e-8)))+" that is equal or less than "+txt[7]+" ? ";

}

if ( step==4&&step<(n2-1) ) {

//scaffoldtxt="Largest number that can multiply "+ i1 +" that is < "+getNumber(i3,i1)+" ? ";

scaffoldtxt="Largest number that can multiply "+ i1 +" that is =< "+tv[9]+" ? ";

scaffoldtxt1="Largest number that can multiply "+ i1 +"*"+(int)(Math.pow(10,(int)(Math.log(i2/10000)/Math.log(10.)+1.e-8)))+" that is equal or less than "+txt[9]+" ? ";

} // added by wee notice the step only until step==4, so only works for digits 12345

// need to copy and paste more steps if needed for large numbers like 123456

into ...........

for(int i=0;i<(n2-1);i++){

scaffoldtxtarray[j]="Largest number that can multiply "+ i1 +" that is =< "+tv[2*i+1]+" ? ";

scaffoldtxt1array[j]="Largest number that can multiply "+ i1 +"*"+(int)(Math.pow(10,(int)(Math.log(i2/100)/Math.log(10.)+1.e-8)))+" that is equal or less than "+txt[2*i+1]+" ? ";

}

wonder if it will work :)

got to test it with more codes to make the scaffold texts appear correctly