How to find gcd using middle school method? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to find gcd using middle school method?

gcd of two numbers in c

4th Oct 2017, 11:43 AM
Ranjit Gowda V R
Ranjit Gowda V R - avatar
1 Answer
+ 2
subtract the larger num with the smaller one, assign it to the larger one repeat this until one of them is 0,then the other one would be their gcd. maybe not so efficient but works ;)
7th Oct 2017, 1:38 PM
hmysjiang🍀
hmysjiang🍀 - avatar