Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Ada

(standard version)

Date:04/20/05
Author:Gautier de Montmollin
URL:n/a
Comments:0
Info:n/a
Score: (3.44 in 39 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

Alternative Versions

VersionAuthorDateCommentsRate
multitaskingtmoran[at]bix[dot]com04/20/050

Comments

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!

Name:

eMail:

URL:

Security Code:
  
Comment: