You are using string array. However, I think you only need to show one of the element at a time.

You can try to use

[code]

if (step<(n2-1) ) {

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

scaffoldtxt1="Largest number that can multiply "+ i1 +"*"+(int)(Math.pow(10,(int)(Math.log(i2/100)

}

[/code]

[/quote]

beautiful. Thanks for reading this self-posting, to force myself to continue to work improve the applet.

interestingly i didn't think of it your way, indeed elegant. Thanks!

i was still thinking of doing a for loop LOL. ;D

the complete code is

if ( step==-1 ) { // method for step -1 is different from step 0 onwards

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

scaffoldtxt1="Largest number that can multiply "+ i1 +"*"+scaffoldpower+" that is equal or less than "+i3+" ? ";

}

else if (step<(n2-1) ) { // testing You are using string array. However, I think you only need to show one of the element at a time.

//You can try to use

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

//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[2*i+1]+" ? ";

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

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[2*step+1]+" ? ";

}

else if (step==(n2-1)&&answermode==true ){ // added to create a end message

scaffoldtxt="Well Done!" ;

scaffoldtxt1="Well Done! ";

}

else if (step==(n2-1)&&answermode==false ) {

scaffoldtxt="Now test your understanding using the input! " ;

scaffoldtxt1="Now test your understanding using the input! ";

}