This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic Brain Teasers => TI-BASIC
Author Message
BatBlaster


Member


Joined: 10 Oct 2007
Posts: 160

Posted: 07 Dec 2007 10:05:48 pm    Post subject:

Click!
I wanna see if yopu come up with the same solution I do.
A) Stop the zeroes from appearing.
B) assign one key to exit.


Last edited by Guest on 07 Dec 2007 10:24:18 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 07 Dec 2007 10:18:01 pm    Post subject:

TI|BD is so much better than the wiki you link to. Our entry on getKey is more comprehensive, too.

And I've always gone with
spoiler wrote:
Repeat Ans=45
Repeat Ans
getKey
End
Disp Ans
End


Last edited by Guest on 07 Dec 2007 10:22:37 pm; edited 1 time in total
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 07 Dec 2007 10:23:29 pm    Post subject:

Spoiler wrote:
Repeat Ans=45
getKey
If Ans
Disp Ans
End

What did you have, BatBlaster?


Last edited by Guest on 04 Sep 2010 07:28:31 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 07 Dec 2007 10:24:58 pm    Post subject:

Gah, beaten at such a simple problem. My excuse is I haven't written a TI-Basic program in several months?
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 07 Dec 2007 10:29:41 pm    Post subject:

It's such a simple teaser, it hardly merits a second look. Rolling Eyes

Last edited by Guest on 07 Dec 2007 10:30:37 pm; edited 1 time in total
Back to top
BatBlaster


Member


Joined: 10 Oct 2007
Posts: 160

Posted: 08 Dec 2007 01:45:31 pm    Post subject:

(What I got) wrote:
:While 1
:getKey->X
:While X=O
:getKey->X
:If X /=(does not =) 0
:Disp X
:End
:If X=22
:Then
:[s]Disp X[/s]
:Stop
:End
:End

The strikew out code was in there, but I removed it.


Last edited by Guest on 08 Dec 2007 01:45:46 pm; edited 1 time in total
Back to top
Flofloflo


Member


Joined: 07 Nov 2007
Posts: 120

Posted: 03 Jan 2008 02:12:26 pm    Post subject:

Still I wonder, is Repeat faster then While???
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 03 Jan 2008 02:59:27 pm    Post subject:

Should be the same speed, give or take a few milliseconds.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement