Language Verilog
| Date: | 04/20/05 |
| Author: | Danny Mulligan |
| URL: | n/a |
| Comments: | 2 |
| Info: | n/a |
| Score: |
/***********************************************************
* Module: 99 bottles of beer
* By Danny Mulligan
***********************************************************/
module beer;
integer i;
initial begin
for (i=99; i>0; i=i-1)
begin
$display("%0d bottles of beer on the wall,", i);
$display("%0d bottles of beer,", i);
$display("Take one down and pass it around,");
if (i==1)
$display("No more bottles of beer on the wall.\n");
else
$display("%0d bottles of beer on the wall.\n", i-1);
end
$display("Go to the store and buy some more.");
end
end
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