answersLogoWhite

0

How do you find GCD of numbers?

User Avatar

Anonymous

14y ago
Updated: 8/19/2019

This question has been asked ten thousands time, but never mind...

int gcd (int a, int b)

{

if (a<0) a= -a;

if (b<0) b= -b;

while (b > 0) { int tmp = b; b = a % b; a = tmp; }

return a;

}

User Avatar

Wiki User

14y ago

What else can I help you with?