Language GeneXus
| Date: | 05/30/05 |
| Author: | Enrique Almeida |
| URL: | n/a |
| Comments: | 0 |
| Info: | http://www.genexus.com/ |
| Score: |
/* *******************************************
99 beers
Written by Enrique Almeida
GeneXus 8.0 - Generated in C# - Console Application.
****************************************** */
&Bottles=99
do while &Bottles > 0
do 'Bottles'
Msg(&BottlesTXT+ "of beer on the Wall, " + &BottlesTXT+ "of beer," , status)
&Bottles=&Bottles-1
do 'Bottles'
Msg("take one down, pass it around, " + &BottlesTXT+ "of beer on the wall." , status)
Msg(NewLine(),status)
enddo
Msg("No more bottles of beer on the wall. No more bottles of beer...", status)
Msg("Go to the store and buy some more...99 bottles of beer." , status)
return
//**************************************
// Check if use bottle or bottles
sub 'Bottles'
If &Bottles > 1
&BottlesTXT=str(&Bottles,2) + " bottles "
else
If &Bottles = 1
&BottlesTXT=str(&Bottles,2) + " bottle "
else
&BottlesTXT="No more bottles "
endif
endif
endsub
Download Source | Write Comment
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!
Comments