Talk:Least common multiple: Difference between revisions

→‎Java solution: Nope, but it doesn't matter cause the way it is now is better
(→‎Java solution: new section)
(→‎Java solution: Nope, but it doesn't matter cause the way it is now is better)
Line 26:
 
I suspect the intention of the java code before my edits was<lang java>for (i = MultipleOfN/m; ...)</lang> instead of <lang java>for (i = MultipleOfM/m; ...)</lang>, where the former makes somewhat more sense. --[[User:Ledrug|Ledrug]] 16:25, 22 August 2011 (UTC)
:Nope. I wanted the loop variable to start at the same multiple as it ended on before (i.e. if it multiplied n 5 times to get to the value of multipleOfN, then you'd need to divide it by n to get back to 5). The way it is now makes more sense. I was trying to think of that way, but my brain was stuck somehow. --[[User:Mwn3d|Mwn3d]] 16:32, 22 August 2011 (UTC)
Anonymous user