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 TI 89 Calculator

Date:05/22/05
Author:Janitha Karunaratne
URL:n/a
Comments:3
Info:n/a
Score: (2.85 in 13 votes)
beer()
Prgm
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 99 Bottles of Beer for Ti89
@ Using TI-basic for TI89
@ Written by Janitha Karunaratne (j@janitha.com)
@ 4/2005
@ Replace the --> with the STORE arrow key in your 89
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
99-->b
While b>0
Disp b
Disp "bottle(s) of beer on the wall,"
Disp b
Disp "bottle(s) of beer."
Disp "Take one down, pass it around,"
b-1-->b
Disp b
Disp "bottle(s) of beer on the wall."
EndWhile
EndPrgm

Download Source | Write Comment

Alternative Versions

Comments

>>  The Berzerk Dragon said on 08/27/07 20:50:56

The Berzerk Dragon Just for anyone interested in trying this out on a Ti-89/Ti-89 Titanium (the same code will probably work on the 92/92+/V200, as their implementations of TI BASIC are virtually identical):
The operator represented in the code above as "-->" is actually a single right-pointing arrow character, a.k.a. the "store" operator.

>>  DLoX said on 11/22/07 19:53:37

DLoX You can make the pluralization of "bottles" dependant on the number of bottles with the following statement (or similar) (I only actually tested this on the 89 Titanium):

Disp "bottle"&when(b/=1,"s","";)&... the rest of the line

>>  G4M3RFR34K_666 said on 02/26/08 04:22:47

G4M3RFR34K_666 thank you for that bit DLox i didnt know that piece of TI-BASIC (yay fewer if statements cuz they are a bitch!)

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: