Gagan G Saralayagagang.hashnode.dev·Mar 5, 2024C program to find the GCD and LCM using pointersHere is a C program to find the Greatest common devisor and the Least common multiple of a number. #include<stdio.h> void gcdlcm(int num1,int num2,int*gcd,int*lcm) { int i,max; max=(num1>num2)?num1:num2;//Simple way of saying if num1 is great...7daystreak
Sanya Vermabytebybyte.hashnode.dev·Feb 26, 2024Finding HCF using Java!!HCF(Highest Common Factor), also known as GCD(Greatest Common Divisor) is is the largest positive integer that divides each of the numbers without leaving a remainder. It is widely used in various mathematical and practical applications like Fraction...Euclidean Algorithm
Meet Makwanamsquare.vercel.app·Jan 27, 2024Understanding the Euclidean Algorithm for Finding GCDWhat is GCD What is GCD (Greatest Common Divisor): The Greatest Common Divisor, or GCD, is a fundamental concept in number theory, representing the largest positive integer that divides two numbers without leaving a remainder. Euclidean Algorithm Wha...data structures
Yaroslav Prozorovbyka.hashnode.dev·Jun 10, 2023GCD or HCF of two NumbersDescription GCD (Greatest Common Divisor) or HCF (Highest Common Factor) of two numbers is the largest number that divides both of them. Example: We have a = 4 and b = 6. GSD of 4 and 6 is 2. But how do we find it? We can use the super classic way. T...Mathematics
Aman NadafforTeckbaker's Blogteckbakers.hashnode.dev·Feb 6, 2023Number TheoryHui!! Euclid's Algo Let's start with GCD(Greatest Common Divisor). I would assume you know what GCD is. You might know different ways to calculate GCD. You might use Euclid's Algo to find the GCD of two numbers or you would just represent both number...2 likes·39 readsDSANumber theory
Manoj Vignesh K Mkmmanoj.hashnode.dev·Apr 26, 2020Math Behind Euclid’s TheoremWe were taught in our programming classes that, to calculate gcd of two integers efficiently use the Euclid’s algorithm. Magic The Euclid algorithm is programmed as follows: Take a step back and think for a minute. Why does it work? How did you do th...Mathematics