Language Ada
(standard version)
Date: | 04/20/05 |
Author: | Gautier de Montmollin |
URL: | n/a |
Comments: | 3 |
Info: | n/a |
Score: | ![]() |
-- 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