The code below should print out the multiplication table from 1 to 9. The for loops are fine; however, the logic on the Do until loop is the part causing the problem. Supposedly it will exit the do until loop once (answer = (i*j)) returns true. But this does not happen. If I use <> instead of = it will increment the j count, but it does not care what I enter for answer. I am a little confused as to why this does not work the way I was thinking it did. Please let me knwo if you can help shed some light on this logic with me.
I appreciate your time and help.
Thank you/þankung/Danke/Vjelpa yeCode:<script type="text/vbscript"> Dim i Dim j Dim answer For i = 1 to 9 Step 1 For j = 0 to 9 Step 1 Do answer = InputBox("Whats " & i & " * " & j & "?") Loop Until(answer = i * j) Next Next </script>




Reply With Quote