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 PowerOn

Date:11/22/05
Author:Fred Young
URL:n/a
Comments:0
Info:n/a
Score: (3.00 in 47 votes)
[*
 * Written in PowerOn, a language used to access the Episys database,
 * Symitar's core processing soution for credit unions
 *]

TARGET = ACCOUNT

DEFINE
 x = NUMBER
END

SELECT
 NONE
END

PRINT TITLE = "99 Bottles of Beer"

 FOR X = 99 TO 1 BY -1
  DO
   PRINT X
   PRINT " bottle"

   IF X > 1 THEN PRINT "s"

   PRINT " of beer on the wall, "
   PRINT X
   PRINT " bottle"

   IF X > 1 THEN PRINT "s"

   PRINT " of beer."
   NEWLINE
   PRINT "Take one down and pass it around, "

   IF (X - 1) > 0 THEN PRINT (X - 1)
   ELSE IF (X - 1) = 0 THEN PRINT "no more"

   PRINT " bottle"

   IF (X - 1) <> 1 THEN PRINT "s"

   PRINT " of beer on the wall."
   NEWLINE
   NEWLINE
  END

 PRINT "No more bottles of beer on the wall, no more bottles of beer."
 NEWLINE 
 PRINT "Go to the store and buy some more, 99 bottles of beer on the wall."
 NEWLINE

END

Download Source | Write Comment

Alternative Versions

Comments

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: