Computer Science Canada Prime number counter |
Author: | aussilia [ Mon Jun 27, 2005 2:08 pm ] | ||
Post subject: | Prime number counter | ||
This is my first ever time using Turing to make my own program! ![]() I basically learned all I know so far from this site. Anyway, I remember a math problem when I had to find the first 20 prime numbers. ![]() It was very annoying and I hated it. So I made a prime number counter that lists all the prime numbers from 1 to whatever you want ![]()
I used different stuff that I learned on this site. I gave the program the first 3 primes, then i have it look at each odd number and try to divide it by the list of primes. If it divides, it is not prime so it is not listed, if it does not divide, it is prime so it is added to the list. The process then re-starts with a new longer list of primes. If i have made a mistake, Please tell me! I have a question, how can I make it so that I can scroll up and down the list of numbers? |
Author: | Tony [ Mon Jun 27, 2005 2:14 pm ] |
Post subject: | |
good start. Now it would be even better to post this in [Turing Source Code] and use [code][/code] or better yet [syntax="turing"][/syntax] tags. ![]() |
Author: | Mazer [ Tue Jun 28, 2005 7:49 am ] | ||
Post subject: | Re: Prime number counter | ||
aussilia wrote: I have a question, how can I make it so that I can scroll up and down the list of numbers?
At the very beginning of your program:
|
Author: | Delos [ Thu Jun 30, 2005 3:08 pm ] |
Post subject: | |
No need for you to post 2 seperate threads. Clean this one up (add [code] or [syntax] tags, and I'll move it to Source Code). |