Solved

How to calculate the LCM in Java

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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…

747 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

10 Experts available now in Live!

Get 1:1 Help Now