How to resolve the algorithm 99 bottles of beer step by step in the NetRexx programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm 99 bottles of beer step by step in the NetRexx programming language
Table of Contents
Problem Statement
Display the complete lyrics for the song: 99 Bottles of Beer on the Wall.
The lyrics follow this form: ... and so on, until reaching 0 (zero). Grammatical support for 1 bottle of beer is optional. As with any puzzle, try to do it in as creative/concise/comical a way as possible (simple, obvious solutions allowed, too).
Let's start with the solution:
Step by Step solution about How to resolve the algorithm 99 bottles of beer step by step in the NetRexx programming language
Source code in the netrexx programming language
beer = "bottles of beer on the wall"
removeOne = "Take one down, pass it arround,"
say 99 beer","
say 99 beer.subword(1,3)","
loop i = 98 to 2 by -1
say removeOne
say i beer"."
say
say i beer","
say i beer.subword(1,3)","
end
lastCall = "bottle" beer.delword(1,1)
say removeOne
say i lastCall"."
say
say i lastCall","
say i lastCall.subword(1,3)","
say removeOne
say "No more" beer
You may also check:How to resolve the algorithm Reverse words in a string step by step in the Smalltalk programming language
You may also check:How to resolve the algorithm Additive primes step by step in the Julia programming language
You may also check:How to resolve the algorithm Look-and-say sequence step by step in the PL/M programming language
You may also check:How to resolve the algorithm Recaman's sequence step by step in the Comal programming language
You may also check:How to resolve the algorithm AVL tree step by step in the Tcl programming language