Solved

How to calculate the LCM in Java

Posted on 2011-03-01
3
490 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to install java on RHEL image on EC2 4 41
Is Applet the way to go for my drag and drop system? 8 25
Java syntax, or is it Selenium 6 30
hashmap order 17 37
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Lithium-ion batteries area cornerstone of today's portable electronic devices, and even though they are relied upon heavily, their chemistry and origin are not of common knowledge. This article is about a device on which every smartphone, laptop, an…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

828 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