Language Windows NT Batch
(Uses 2000- and XP-specific features)
Date: | 08/18/05 |
Author: | tester |
URL: | n/a |
Comments: | 0 |
Info: | n/a |
Score: | (2.83 in 6 votes) |
:: 99 Bottles of Beer :: for Windows 2000/XP @echo off setlocal enabledelayedexpansion set bottle=bottles for /l %%* in (99, -1, 1) do ( set number=%%* if !number! EQU 1 set bottle=bottle echo !number! !bottle! of beer on the wall, !number! !bottle! of beer. set /a number=!number!-1 if !number! EQU 1 ( set bottle=bottle ) else ( if !number! EQU 0 ( set bottle=bottles set number=no more ) ) echo Take one down and pass it around, !number! !bottle! of beer on the wall. echo/ ) echo No more bottle of beer on the wall, no more bottles of beer. echo Go to the store and buy some more, 99 bottles of beer on the wall.
Download Source | Write Comment
Alternative Versions
Version | Author | Date | Comments | Rate |
---|---|---|---|---|
1 | Kang Seonghoon (Tokigun) | 06/24/05 | 0 | |
2 | Frank-Peter Schultze | 09/24/05 | 0 |
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