Advertisement
Krasilnikova

for VisualDNA

Mar 8th, 2015
2,810
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'this is a pseudocode that describes a well-known Euclid algorithm for finding a greatest common divisor
  2.  
  3. function GCD(a,b)
  4.  
  5.   while a!=0 and b!=0
  6.   if a>b then a: = a mod b
  7.          else b: = b mod a;
  8.   GCD(a,b) = a + b
  9.   wend;
  10.  
  11. print GCD(a,b)
  12.  
  13. end function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement