deathwish73 wrote:So, the code will work for 500, if I change the 100 above to 500?
Also, my algorithm is not like the C# since it was hard to do using Assembly. Don't know how to do it.
Can you show how to do the program more efficiently? I did it, above and you said it wasn't efficient.
I'm saying you can change the test for 100 to 500 and you should be able to get the code working, following the other suggestions.
The algorithm you used already is not difficult if you hunt around for some examples (like the same place with the printer output).
I didn't say if wasn't efficient, I said it is not usual to use decimals for loop-control. I also suggested you get it working "as is" and then look to change it.
Try to put it all together - plan it out, think about how it should go (why did you think it wouldn't be able to work for 500? or any other value?). You should be able to get something from it. Once you do, then you can think about how to do it in other ways, but if you try that now, you'll likely get confused.