Solved

How to calculate the LCM in Java

Posted on 2011-03-01
3
475 Views
Last Modified: 2012-05-11
hello experts,

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


Thanks.
0
Comment
Question by:mr_object
3 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 35005555
http://mindprod.com/jgloss/gcd.html

lcm = a * b / gcd(a,b)
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 35005572
0
 

Author Closing Comment

by:mr_object
ID: 35005662
Thank you!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

We are taking giant steps in technological advances in the field of wireless telephony. At just 10 years since the advent of smartphones, it is crucial to examine the benefits and disadvantages that have been report to us.
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now