% 99 bottles of beer song implemented in Prolog % Released into the public domain in 2006 by Brent Spillner wall_capacity(99). wait(_) :- true. report_bottles(0) :- write('no more bottles of beer'), !. report_bottles(X) :- write(X), write(' bottle'), (X = 1 -> true ; write('s')), write(' of beer'). report_wall(0, FirstLine) :- (FirstLine = true -> write('No ') ; write('no ')),