Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Recursive Function for Greatest Common Divisior (http://www.go4expert.com/forums/recursive-function-common-divisior-t6749/)

babarsaed 9Oct2007 15:17

Recursive Function for Greatest Common Divisior
 
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.

DaWei 9Oct2007 16:38

Re: Recursive Function for Greatest Common Divisior
 
No, thanks. That's YOUR assignment. We'll help you with your code, though.


All times are GMT +5.5. The time now is 23:42.