You are absolutely right; that's exactly how it's implemented in actual application
Just in case, I have added the explicit type casting to Int64 like: ((Int64)(a/GCD(a,b)))*b, but it might not be necessary, because modern compilers have plenty of intelligence to identify the return type.
Best regards.
Alex
PS. as FYI: I intend to close this comments thread; for any additional comments please use the original solution instead of this alternate one.
Last Visit: 31-Dec-99 18:00 Last Update: 14-Jun-24 22:24