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 BASIC-PLUS

(DEC RSTS/E BASIC)

Date:05/03/09
Author:George Hames
URL:n/a
Comments:1
Info:http://en.wikipedia.org/wiki/BASIC-PLUS
Score: (3.00 in 34 votes)
1	EXTEND
10	!
	Basic Plus version of 99 bottles of beer
	Modified by George Hames (george.hames@ihs.com)
	from prior versions found on this site.

1000  FOR BOTTLES% = 99% TO 1% STEP -1% \
          PRINT BOTTLES%; "bottle"; \		
          PRINT "s"; UNLESS BOTTLES% = 1% \			
          PRINT " of beer on the wall,"; BOTTLES%; "bottle"; \
          PRINT "s"; UNLESS BOTTLES% = 1% \
          PRINT " of beer" \
          PRINT "Take one down and pass it around," \
          PRINT BOTTLES% - 1%; "bottle"; IF BOTTLES% > 1% \
          PRINT " no more bottles"; IF BOTTLES% = 1% \
          PRINT "s"; IF BOTTLES% > 2% \
          PRINT " of beer on the wall" \
      NEXT bottles% 

32767 END

Download Source | Write Comment

Alternative Versions

Comments

>>  barrym said on 07/16/10 05:34:42

barrym 'UNLESS' is a groovy alternative to 'IF ... THEN' ...
However, you forgot to send someone to the store, 'UNLESS' I'm mistaken!

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: