Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'this is a pseudocode that describes a well-known Euclid algorithm for finding a greatest common divisor
- function GCD(a,b)
- while a!=0 and b!=0
- if a>b then a: = a mod b
- else b: = b mod a;
- GCD(a,b) = a + b
- wend;
- print GCD(a,b)
- end function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement