BookML test: the algorithmicx package

Szász János
szaszjanos@users.sourceforge.net

BookML

v0.28.5

0.8.8

2018/12/01

Algorithm 1 Euclid’s algorithm
1: procedure Euclid(a,ba,b)\triangleright The g.c.d. of a and b
2:      ramodbr\leftarrow a\bmod b
3:      while r0r\not=0 do\triangleright We have the answer if r is 0
4:          aba\leftarrow b
5:          brb\leftarrow r
6:          ramodbr\leftarrow a\bmod b
7:      end while
8:      return bb\triangleright The gcd is b
9: end procedure
1: repeat\triangleright forever
2:      this
3: until you die.