Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

cpp code for euclids GCD

int gcd(int a,int b) {
  int R;
  while ((a % b) > 0)  {
    R = a % b;
    a = b;
    b = R;
  }
  return b;
}
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #cpp #code #euclids #GCD
ADD COMMENT
Topic
Name
7+6 =