I am trying to make a quick program where I need a random number list with a generator, where have number in that list is a different number. I have it so that the list is 9 entries long and the numbers that can go into it are the numbers 1-9. I was wondering if there was an easy way of doing this instead of having to manually have each entry compare itself with others using If commands.
if you have an 84+ with os 2.53MP or higher: http://tibasicdev.wikidot.com/randintnorep

if you have an 83+ or something, you can use the other code on that page I believe. or you could do your method.
If you don't have a MATHPRINT or color calculator, use:

Code:
rand(9→L₂
cumSum(1 or Ans→L₁
SortA(L₂,L₁

This gives you the list in L₁.

If you do have a MATHPRINT or color calculator, use

Code:
randIntNoRep(1,9
  
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