Skip to main content

Greatest Common Divisor and Least Common Denaminator Solver Version 1.0


Hello everyone this is my new code in Java that I called it Greatest Common Divisor and Least Common Denominator Solver Version 1. The code is quiet complex because it deals with pure mathematical computation but it is easy to adapt one you understand the flow of the program.

In mathematics, the greatest common divisor (gcd), sometimes known as the greatest common factor (gcf) or highest common factor (hcf), of two non-zero integers, is the largest positive integer that divides both numbers without remainder.

In plain language: in the problem 3 x 4 = 12, 3 and 4 are factors and 12 is the product or multiple. A common factor is a number which is a factor of two different problems; thus, in 1 x 4 the factors are 1, 2 and 4 (1 x 4 = 4; 2 x 2 = 4) and in 1 x 6 the factors are 1, 2, 3 and 6 (1 x 6 = 6; 2 x 3 = 6}; therefore the common factors of the two problems are 1 and 2, with 2 being the highest common factor.

 On the other hand the lowest common denominator or least common denominator (abbreviated LCD) is the least common multiple of the denominators of a set of vulgar fractions. It is the smallest positive integer that is a multiple of the denominators.

If you find this code useful send me an email at [email protected]. People here in the Philippines who wish to contact me they can reach me at my mobile number 09296768375. Thank you very much and Happy Programming.


Mr. Jake Rodriguez Pomperada, MAED - Instructional Technology

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


Submitted byAnonymous (not verified)on Thu, 02/26/2009 - 14:15 have a good design in your program..but do you have a code in finding lcd and gcf using object orriented design??tanx..
Submitted byAnonymous (not verified)on Thu, 02/26/2009 - 16:55

In reply to by Anonymous (not verified)


You can modify my code to use OOP approach in Java. I use this approach because it is easy to me to understand and implement feel free to modify and change to suited in your needs. Thanks for your appreciation of my work.


Jake :-D

Submitted byfranklinm3on Thu, 02/26/2009 - 14:19

Hallo .



Am looking for a project that would manage a small database which comprise of partners who contribute to manage an institution...a small program thatcan do that and i can avail the database to those willing to running short of time and your help will be blessed

Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.