TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ahmed sami
NA
64
200.6k
The greatest common divisor of integers x and y
Dec 10 2012 5:26 PM
The greatest common divisor of integers x and y is the largest integer that evenly divides both x and y.
Write a recursive method Gcd that returns the greatest common divisor of x and y.
The Gcd of x and y is defined recursively as follows:
If y is equal to 0, then Gcd( x, y) is x; otherwise, Gcd( x, y ) is Gcd( y, x % y ), where % is the modulus operator.
Reply
Answers (
2
)
help an elementary school student learn multiplication
Converting List of Int Array to Dictionary