Se consideră următorul algoritm
citeste x,y,z
daca y<x atunci
x- y
sfarsit daca
daca z<x atunci
x - z
sfarsit daca
scrie x
