Language Parlog
| Date: | 10/19/05 |
| Author: | Alin Suciu |
| URL: | http://users.utcluj.ro/~suciu/ |
| Comments: | 2 |
| Info: | http://www.parlog.com/en/parlog.html |
| Score: |
% 99 bottles of beer generator in Parlog
% author: Alin Suciu <alin.suciu@cs.utcluj.ro>
mode bottles.
bottles <-
bottles(99).
mode bottles(?).
bottles(1) <-
write('1 bottle of beer on the wall, 1 bottle of beer.') & nl &
write('Take one down, and pass it around, no more bottles of beer on the wall.') & nl & nl &
write('No more bottles of beer on the wall, no more bottles of beer.') & nl &
write('Go to the store and buy some more, 99 bottles of beer on the wall.') & nl.
bottles(N) <-
N > 1 :
N1 is N - 1 ,
write(N) & write(' bottles of beer on the wall, ') &
write(N) & write(' bottles of beer.') & nl &
write('Take one down and pass it around, ') &
write(N1), write(' bottles of beer on the wall.') & nl & nl,
bottles(N1).
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments
ps: in caz ca u v-ati prin sunt la universitatea tehnica Cluj Napoca
grupa 3242 si stau in observator caminul 7 camera 28 la parter...
But where's the parallelism?!
I like to drink several bottles concurrently
Tom