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 ABAP

(standard version)

Date:04/20/05
Author:Dominik Ritter
URL:n/a
Comments:0
Info:n/a
Score: (2.98 in 43 votes)
REPORT  z_99_bottles_of_beer.
*&---------------------------------------------------------------------*
*& Author: Dominik Ritter                                              *
*&---------------------------------------------------------------------*

DATA: nobottles  TYPE i.

START-OF-SELECTION.

  nobottles = 99.
  WHILE nobottles GT 1.

    WRITE:/(2) nobottles, ' bottles of beer on the wall, '.
    WRITE:/(2) nobottles, ' bottles of beer.'.
    WRITE:/ 'Take one down, pass it around, '.
    nobottles = nobottles - 1.
    WRITE:/(2) nobottles, ' bottles of beer on the wall.'.
    SKIP.

  ENDWHILE.

  WRITE:/ '1 bottle of beer on the wall,'.
  WRITE:/ '1 bottle of beer.'.
  WRITE:/ 'Take one down, pass it around, '.
  WRITE:/ 'no more bottles of beer on the wall.'.

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
object-oriented versionDominik Ritter04/20/050
Use of Forms and MacrosDavid Lacorre11/19/081

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: