I have made my first small program in TI-Baisic Very Happy Very Happy Very Happy . i kinda made my own magic 8 ball in how you tell it a yes or no question and it gives you a yes,no,maybe,ask me later,what?,and only time will tell. if you want the code here it is


Code:
clrhome
RandInt(1,6) -> A
if A=1
then
disp ¨yes¨
end
if A=2
then
disp ¨no¨
end
if A=3
then
disp ¨maybe¨
end
if A=4
then
disp ¨try later¨
end
if A=5
then
disp ¨what?¨
end
if A=6
then
disp ¨only time will tell¨
end
Welcome to Cemetech!

Just to let you know, you can use the code tag to enclose code that you put in a forum post, like this:

Code:
ClrHome
Input "ASK A QUESTION: ",Str1
int(6rand
Disp sub("YES  NO   MAYBEWHAT?ASK ME LATERONLY TIME WILL  TELL",5Ans+1+7(Ans=5),5+int(7.5(Ans>3)(Ans-3

This, by the way, is how I would write the program you described.

If your code is too long to post, or you don't quite want to do that, you could upload your file to the Cemetech archives and direct people there.

Either way, I'm curious to see how you made this program. Share it with us!
Congrats!
JWinslow23 wrote:
Welcome to Cemetech!

Just to let you know, you can use the code tag to enclose code that you put in a forum post, like this:

Code:
ClrHome
Input "ASK A QUESTION: ",Str1
int(6rand
Disp sub("YES  NO   MAYBEWHAT?ASK ME LATERONLY TIME WILL  TELL",5Ans+1+7(Ans=5),5+int(7.5(Ans>3)(Ans-3

This, by the way, is how I would write the program you described.

If your code is too long to post, or you don't quite want to do that, you could upload your file to the Cemetech archives and direct people there.

Either way, I'm curious to see how you made this program. Share it with us!


im haveing LAX18 put it in the arcive and i will be sure to put my programs in that format in the future

Zingzing wrote:
Congrats!

thank you
Tip: You can remove the "Then" and "End commands in an "If" statement if the True statement is 1 line.

Code:

If A
Then
Disp 1
End
// Try this instead
If A
Disp 1
  
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
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement