BookML test: the algorithmicx package

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

BookML

v0.31.9

0.8.8 (perl)

2018/12/01

Algorithm 1 Euclid’s algorithm
1: procedure Euclid(a,ba,b)▷\triangleright The g.c.d. of a and b
2:      r←amodbr\leftarrow a\bmod b
3:      while r≠0r\not=0 do▷\triangleright We have the answer if r is 0
4:          a←ba\leftarrow b
5:          b←rb\leftarrow r
6:          r←amodbr\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.