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
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
The Berzerk Dragon said on 08/27/07 20:50:56
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
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
thank you for that bit DLox i didnt know that piece of TI-BASIC (yay fewer if statements cuz they are a bitch!)