Language D
| Date: | 04/20/05 |
| Author: | Philipp Winterberg |
| URL: | http://www.winterbergs.de/ |
| Comments: | 7 |
| Info: | http://www.digitalmars.com/d/index.html |
| Score: |
// D version of 99 Bottles of beer (Bottles.d)
// (http://www.digitalmars.com/d/index.html).
// Philipp Winterberg, http://www.winterbergs.de
int main()
{
for (int b = 99; b > 0; b--)
{
printf("%d bottle(s) of beer on the wall,\n", b);
printf("%d bottle(s) of beer.\n", b);
printf("Take one down, pass it around,\n");
printf("%d bottle(s) of beer on the wall.\n\n", (b-1));
}
return 0;
}
Download Source | Write Comment
Alternative Versions
| Version | Author | Date | Comments | Rate |
|---|---|---|---|---|
| 1 | Stewart Gordon | 05/31/05 | 4 | |
| Template metaprogramming | Don Clugston | 07/11/06 | 1 | |
| D feuture's galore | Fredrik Olsson | 10/09/05 | 2 | |
| Fiber "Ring" | Bryan Knowles | 11/17/10 | 0 | |
| Div Operator Edition | badmadevil | 02/29/08 | 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
http://shootout.alioth.debian.org/great/
1. writef, not printf
2. import std.stdio; missing.
expression or two. Geez Louise..........