Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #55.0K
2 Posted Topics
I have a function that does intermediate calculations to a greatest common divisor deal. and here is how its implemented iteratively (see exteuc() function) . i tried to implement it recursively too, (see exteuc2() function) . feel free to look at it and give me suggestions if i can improve … | |
[code]int gcd (int num1, int num2) { int remainder; if (num1 > num2) remainder = num1 % num2; else remainder = num2 % num1; if(remainder!=0) { return gcd(remainder, num1); } return num1; } int gcd2 (int num1, int num2) { int remainder; return ( remainder = ( num1 > num2 … |
The End.