answersLogoWhite

0

while b is not equal to zero

... temp = b

... b = a mod b

... a = temp

return a

Knuth, Donald E. The Art of Computer Programming, Volume 1: Fundamental Algorithms (3rd ed.) (Section 1.2.1: Mathematical Induction, pp. 319-320.)

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

MaxineMaxine
I respect you enough to keep it real.
Chat with Maxine
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa

Add your answer:

Earn +20 pts
Q: Can someone right a pseudo code to find a gcd of 2 numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp