Last active
November 3, 2016 13:47
-
-
Save guaracy/c4e240d68f4894d01c14 to your computer and use it in GitHub Desktop.
Revisions
-
guaracy revised this gist
Feb 8, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ end-if if bottles not equal max display "Take one down and pass it arround" display bottles " " bottle-word " of beer on the wall." display " " end-if display bottles " " bottle-word " of beer on the wall" -
guaracy revised this gist
Feb 6, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,10 +8,10 @@ 77 max pic 9(02) value 99. 77 bottle-word pic x(07). 77 bottles pic 99. 88 too-drunk value 0. procedure division. perform varying bottles from max by -1 until too-drunk if bottles = 1 move "bottle" to bottle-word else -
guaracy created this gist
Feb 6, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ identification division. program-id. 99-bottles. data division. working-storage section. 77 max pic 9(02) value 99. 77 bottle-word pic x(07). 77 bottles pic 99. 88 terminou value 0. procedure division. perform varying bottles from max by -1 until terminou if bottles = 1 move "bottle" to bottle-word else move "bottles" to bottle-word end-if if bottles not equal max display "Take one down and pass it arround" display z9 bottles " " bottle-word " of beer on the wall." display " " end-if display bottles " " bottle-word " of beer on the wall" display bottles " " bottle-word " of beer" end-perform. display "Take one down and pass it arround" display "No more bottles of beer on the wall." display " " display "Go to the store and buy some more " display max " bottles of beer on the wall.". stop run.