Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Fortran IV

Date:04/20/05
Author:Allen Mcintosh
URL:n/a
Comments:1
Info:n/a
Score: (2.36 in 11 votes)
C Allen Mcintosh
C mcintosh@bellcore.com 
      integer bottls
      do 50 i = 1, 99
         bottls = 100 - i
         print 10, bottls
10       format(1x, i2, 31h bottle(s) of beer on the wall.)
         print 20, bottls
20       format(1x, i2, 19h bottle(s) of beer.)
         print 30
30       format(34h Take one down and pass it around,)
         bottls = bottls - 1
         print 10, bottls
         print 40
40       format(1x)
50    continue
      stop
      end

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
a more elaborate versionJohannes Schöön02/03/101

Comments

>>  C. Watson said on 08/05/06 16:08:35

C. Watson Nit pick: should be all upper case for pure FORTRAN IV. (really nit pick: the title is wrong as well. FORTRAN prior to Fortran 90 is spelled all upper as well). I seem to recall that the PRINT X statement wasn't portable (as per the bible, McCracken).

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!

Name:

eMail:

URL:

Security Code:
  
Comment: