Language Ratfor
Date: | 05/30/05 |
Author: | Martyn Davies |
URL: | n/a |
Comments: | 0 |
Info: | http://sepwww.stanford.edu/software/ratfor.html |
Score: | (2.57 in 7 votes) |
integer beers integer part beers=99 part=0 repeat { if(part==0 || part==3) { if(beers==1) print *,'1 bottle of beer on the wall' else print *,beers,' bottles of beer on the wall' if(part==3) print *,'-' } else if(part==1) { if(beers==1) print *,'1 bottle of beer' else print *,beers,' bottles of beer' } else { print *,'take one down, pass it around' beers = beers - 1 } part = Mod( part+1, 4 ) } until (beers==0 && part==0) end
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