Euclidean algorithm, Data Structure & Algorithms

The Euclidean algorithm is an algorithm to decide the greatest common divisor of two positive integers. The greatest common divisor of N and M, in short GCD(M,N), is the largest integer X such as as M and N are evenly dividable with X. Some examples:

GCD(18,12) = 6

GCD(42,56) = 14

GCD(9,28) = 1

Write a program that takes two integers as input and calculates (and presents) their GCD using this algorithm.

Posted Date: 3/14/2013 6:07:03 AM | Location : United States

Related Discussions:- Euclidean algorithm, Assignment Help, Ask Question on Euclidean algorithm, Get Answer, Expert's Help, Euclidean algorithm Discussions

Write discussion on Euclidean algorithm
Your posts are moderated
Related Questions
Define the term - Array A fixed length, ordered collection of values of same type stored in contiguous memory locations; collection may be ordered in several dimensions.

The pre-order and post order traversal of a Binary Tree generates the same output. The tree can have maximum One node

explain quick sort algorithm

Best - Fit Method: - This method obtains the smallest free block whose  size is greater than or equal to get such a block by traversing the whole free list follows.

What do we mean by algorithm? What are the characteristics of a good and relevant algorithm? An algorithm is "a step-by-step procedure for finishing some task'' An algorithm c

Importance of Object-Oriented over java Java is basically based on OOP notions of classes and objects. Java uses a formal OOP type system that should be obeyed at compile-t

What do you mean by hash clash? Hashing is not perfect. Occasionally, a collision occurs when two different keys hash into the same hash value and are assigned to the same arra

i need the full concept of it... please can anyone provide

Have you ever thought about the handling of our files in operating system? Why do we contain a hierarchical file system? How do files saved & deleted under hierarchical directories