TI-89 HomeGames ArchiveTitanium GamesGames How ToProgramsFAQForumTI-89 WikiLinks

using lists in programs

 
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> BASIC Programming
Author Message
mathlover987



Joined: 10 Jan 2011
Posts: 7

PostPosted: May 23, 2011 8:39 PM    Post subject: using lists in programs Reply with quote

Im trying to write a program that gives me all the prime numbers in a list. I want to create "prime number list" (we'll call it "a") that adds to itself. I want to basically do this:

2 and 3 are members of list "a"
b=5
If b/2 does not equal the greatest integer (int) of b/2 and b/3 does not equal the greatest integer of b/3
Then 5 is a member of "a"
Then b + 2 ->b

The program will loop and display all prime numbers. However, I'm not sure how to easily add numbers to lists or how to divide by all numbers in a list. If anyone could help that would be great. BTW this is not the complete program, just the basic idea for it.
Back to top
View user's profile Send private message
Display posts from previous:    View previous topic : View next topic  
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> BASIC Programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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

Contact Us | Privacy Policy | Disclaimer | Trademarks

Copyright ©2006 All rights reserved.


Free Greeting Cards | Girly Myspace Layouts | Myspace Unblocker |