Language FORTRAN 77
(Arithmetic IF Version)
Date: | 06/22/05 |
Author: | Alex Ford |
URL: | n/a |
Comments: | 2 |
Info: | http://www.fortran.com/fortran/F77_std/rjcnf.html |
Score: | (3.00 in 38 votes) |
program ninetyninebottles integer bottles * 99 Bottles of Beer, as implemented in FORTRAN 77 * Written by Alex Ford - gustavderdrache@bellsouth.net * Notable feature: Arithmetic IF statement bottles = 99 * Format statements 1 format (I2, A) 2 format (A) 3 format (I2, A, /) 4 format (A, /) * First 98 or so verses 10 write (*,1) bottles, ' bottles of beer on the wall,' write (*,1) bottles, ' bottles of beer.' write (*,2) 'Take one down, pass it around...' if (bottles - 1 .gt. 1) then write (*,3) bottles - 1, ' bottles of beer on the wall.' else write (*,3) bottles - 1, ' bottle of beer on the wall.' end if bottles = bottles - 1 if (bottles - 1) 30, 20, 10 * Last verse 20 write (*,1) bottles, ' bottle of beer on the wall,' write (*,1) bottles, ' bottle of beer.' write (*,2) 'Take one down, pass it around...' write (*,4) 'No bottles of beer on the wall.' 30 stop end
Download Source | Write Comment
Alternative Versions
Version | Author | Date | Comments | Rate |
---|---|---|---|---|
FORMAT edit descriptors, obfuscation | Robin Haberkorn | 01/16/07 | 1 | |
standard version | Anonymous | 04/20/05 | 1 |
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
Rosanne said on 06/23/05 03:18:45
Winner!
SaraAvery said on 07/10/10 09:29:07
Have no a lot of cash to buy a car? You not have to worry, because it's real to receive the <a href="http://bestfinance-blog.com/topics/credit-loans">credit loans</a> to resolve all the problems. Thence get a short term loan to buy everything you need.