Recursive Function for Greatest Common Divisior
|
Newbie Member
|
|
| 9Oct2007,15:17 | #1 |
|
Q.write programe for the greatest common divisor of integers X and Y is the largest interger the evenly divides both X and Y. write a recursive function gcd that returns tha greatest common divisior of X and Y. the gcd of X and Y is defined recursivly as follows: if Y is equal to 0. then gcd (X,Y) is X; otherwise gcd (X,Y) is gcd (Y,X%Y) whre % is the modulus Operator.
|
|
Team Leader
|
![]() |
| 9Oct2007,16:38 | #2 |
|
No, thanks. That's YOUR assignment. We'll help you with your code, though.
|

