Language Ada
(standard version)
Date: | 04/20/05 |
Author: | Gautier de Montmollin |
URL: | n/a |
Comments: | 3 |
Info: | n/a |
Score: | (3.02 in 122 votes) |
-- Ada version of 99 Bottles of Beer with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; procedure Bottles is count : Integer := 99; begin while count > 0 loop Put (count, Width=>0); Put_Line (" bottles of beer on the wall,"); Put (count, Width=>0); Put_Line (" bottles of beer."); Put_Line ("Take one down and pass it around."); count := count - 1; if count = 0 then Put_Line("No bottles of beer on the wall!"); else Put (count, Width=>0); Put_Line (" bottles of beer on the wall."); end if; New_Line; end loop; end Bottles;
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
David Short. said on 09/14/08 12:13:18
This fails to compile.
Pez said on 09/24/08 14:02:21
Compiles just fine on gcc 4.3 with the Ada frontend. Just tested on opensuse.
Harald Arnesen said on 04/17/09 20:38:46
"1 bottles of beer"?