Kiválasztás(N,X,BARÁT,NAP): I:=1 Ciklus amíg (X[I].név nem egyenlő BARÁT) I:=I+1 Ciklus vége NAP:=X[I].névnap Eljárás vége