Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 516
  • Last Modified:

How to calculate the LCM in Java

hello experts,

how to calculate the LCM of some numbers (how many numbers I have to calculate will come dynamically) in Java?


Thanks.
0
mr_object
Asked:
mr_object
1 Solution
 
CEHJCommented:
http://mindprod.com/jgloss/gcd.html

lcm = a * b / gcd(a,b)
0
 
Gurvinder Pal SinghCommented:
0
 
mr_objectAuthor Commented:
Thank you!!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now