answersLogoWhite

0

algorithm GCD (a, b) is:
while (a <> b) do
if a > b then a := a - b else b := b - a
end while
return a

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

A Write the algorithm to concatenate two given strings?

a write the algorithm to concatenate two given string


Write an algorithm and draw a corresponding flowchart to search a number in the given list of numbers and also display its position?

please give me an algorithm and a corresponding flow chart that displays list of numbers from 1 to 20.


Can you write an algorithm to find the beast numbers?

maybe


Write an algorithm to check whether a number is a prime number or not?

You can write out this algorithm. This will then be programmed into the device to make determining prime numbers easier.


Write algorithm and draw flowchart to find the sum of even numbers?

jgfujtf


Write an algorithm to print sum of all even numbers?

Start print "the sum of all even numbers is infinite" end


What is algorithm to write algorithm to the program to access a pointer variable in structure?

Here is the algorithm of the algorithm to write an algorithm to access a pointer in a variable. Algorithmically.name_of_the_structure dot name_of_the _field,eg:mystruct.pointerfield


Write an algorithm to find the root of quadratic equation?

Write an algorithm to find the root of quadratic equation


How to write a java program that determines the number of prime numbers less than N which is given by the user?

where to start? do you have an algorithm and just want to implement it in java? depends on how big N is, as that will determine which method is most efficient


Can you write an algorithm to solve the given problem?

Yes, an algorithm is a step-by-step procedure for solving a problem. It typically involves a series of instructions that can be followed to achieve a specific goal or outcome.


How do you write a fraction or decimal that has a value between the given numbers?

Without knowing what the numbers are, I would suggest taking the mean of the given numbers.


Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html