|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|||
|
Ti84: prime number program
I've been working on this program to find prime numbers for awhile, at the moment it hits a memory error at #743 and I am at a loss to improve it further. any suggestions would be much appreciated...
3->L1(1 1->A 3->X Lbl D x+2->X for(B,1,A) X/L1(B)->E if E=int(E):GoTo D end A+1->A X->L1(A Disp X GoTo D |
|
|
||||
|
This seems a lot like homework to me. Check our forum rules.
__________________
Click the image if at any point you don't like my decision.10011100011000101111100011100000011000000100000011 10010011011110110001101101011011110100011000001110 0100111101000100001 Visit Nilpo.com and Ask the Windows Guru! Open me for some very useful links!
![]() |
|
|||
|
it isn't homework. I wish I was in a class where this sort of thing would be assigned. I really do.
also, there is no rule that I could find about homewrok. (this is still not homework) |
|
|||
|
Quote:
that was really badly phrased on my part, it stops on the number 734 |
|
||||
|
Quote:
734th prime number is 5563. Quote:
734th prime number is 5563. 735th prime number is 5569. It doesn't sounds big to me. |
|
|||
|
Quote:
you made a mistake in the program itself it's dumb to use if var then goto because it will keep using more ram unless you put an end statement at the beginning of the new label. try out this: 3->L1(1 1->A 3->X Goto D Lbl A End Lbl D x+2->X for(B,1,A) X/L1(B)->E if E=int(E) Then GoTo A end A+1->A X->L1(A end Disp X GoTo D edited it again, this should work even longer. i didn't try it, but i found a 'unclosed' for statement in my previous edit, try this. |