About 529,000 results
Open links in new tab
  1. Java Program to Compute GCD - GeeksforGeeks

    Apr 4, 2025 · GCD (Greatest Common Divisor) of two given numbers A and B is the highest number that can divide both A and B completely, i.e., leaving the remainder 0 in each case. GCD is also called HCF(Highest Common Factor).

  2. Java Program to Find GCD of two Numbers

    In this program, you'll learn to find GCD of two numbers in Kotlin. This is done by using for and while loops with the help of if else statements.

  3. Java Program to Find GCD or HCF of Two Numbers

    Mar 28, 2021 · GCD (i.e. Greatest Common Divisor) or HCF (i.e. Highest Common Factor) is the largest number that can divide both the given numbers. Example: HCF of 10 and 20 is 10, and HCF of 9 and 21 is 3.

  4. Java Program to Find GCD of Two Numbers - Tpoint Tech

    In this section, we have covered different logics in Java programs to find GCD of two numbers. Greatest Common Divisor: It is the highest number that completely divides two or more numbers. It is abbreviated for GCD. It is also known as the Greatest Common Factor (GCF) and the Highest Common Factor (HCF). It is used to simplify the fractions.

  5. Java Program for Basic Euclidean algorithms - GeeksforGeeks

    Dec 4, 2018 · GCD (Greatest Common Divisor) of two given numbers A and B is the highest number that can divide both A and B completely, i.e., leaving the remainder 0 in each case. GCD is also called HCF(Highest Common Factor).

  6. How to write a simple Java program that finds the greatest …

    The greatest common divisor (GCD) of two integers a and b is the largest integer that is a factor of both a and b. The GCD of any number and 1 is 1, and the GCD of any number and 0 is that number. One efficient way to compute the GCD of two numbers is to use Euclid's algorithm, which states the following:

  7. Finding the Greatest Common Divisor (GCD) in Java: A …

    In this tutorial, we will explore how to find the Greatest Common Divisor (GCD) of two integers using Java. Understanding GCD is fundamental in number theory and has practical applications in algorithms, cryptography, and simplifying fractions.

  8. How to Find Greatest Common Divisor of two numbers in Java

    Simple Java program to find GCD (Greatest Common Divisor) or GCF (Greatest Common Factor) or HCF (Highest common factor). The GCD of two numbers is the largest positive integer that divides both the numbers fully i.e. without any remainder.

  9. Java Program to find GCD | CodeToFun

    Nov 16, 2024 · One frequently encountered mathematical concept is the Greatest Common Divisor (GCD) of two numbers. The GCD is the largest positive integer that divides both numbers without leaving a remainder. In this tutorial, we'll explore a Java program that efficiently calculates the GCD of two given numbers.

  10. How to Find the GCD of Two Numbers in Java: A Comprehensive …

    There are multiple approaches to find the GCD of two numbers in Java. Each method is suited for different scenarios and problems. Here’s a detailed look at the most popular methods:

  11. Some results have been removed
Refresh