.AXEEE
0->A
1->B
Prompt {C}r
If {C}r less than or equal to 2
Stop
If Remainder({C}r,2)=(0)
A+1->A
While ({C}r//B) greater than or equal to (squareroot({C}r))
If Remainder({C}r,B)=(0)
A+1->A
B+2->B
If A greater than or equal to 2
Goto 1
End
Disp "PRIME"
Stop
Lbl 1
Disp "Composite"
Pause
Disp "BYE"
ok i am extremely new at thiisThe Disp command does only support pointers, not strings like u did
what is wrong with my prog.
all i know so far is that i think prompt is not supported
____________________________________________________
sry parents get on just to bug me and dont let me finish
_______________________________________________
also i am completely new at axe so things will look comppletely wrong
_________________________________________________Code: [Select].AXEEE
0->A
1->B
Prompt {C}r
If {C}r less than or equal to 2
Stop
If Remainder({C}r,2)=(0)
A+1->A
While ({C}r//B) greater than or equal to (squareroot({C}r))
If Remainder({C}r,B)=(0)
A+1->A
B+2->B
If A greater than or equal to 2
Goto 1
End
Disp "PRIME"
Stop
Lbl 1
Disp "Composite"
Pause
Disp "BYE"
Disp "BYE"
should be:"BYE"->Str1
Disp Str1
thanks for the helpNo problem,
i really appreciate this great community where people a patient and help others learn. none of the "go away noob"
i really appreciate it.
the remainder command is a newer command on the ti-84 that came out with the new os that came out early this year ( the one enabling math-print )
basically
Disp Remainder(5,2) " 5 divided by 2 " 2 and 1 over 2 remainder 1" "stuff in 1st grade"
outcome would be 1
Disp Remainder(5,2) " 5 divided by 2 " 2 and 1 over 2 remainder 1" "stuff in 1st grade"It sounds like modulus, which in Axe is represented with the ^. For example, 5^2 = 1. ;D
outcome would be 1
I'm new to Axe too, but I'm pretty sure this is the problem:
Axe doesn't just translate BASIC commands. It crates a totally separate language, so it only accepts the ones that it itself supports, and so most of the commands that you'd use in BASIC, like Remainder(, would not work in Axe.
And for those of you more experienced in Axe programming, I have a question too: Is it compatible with OS 2.53?
0-K
repeat K
getkey->K
end
disp K>dec
but yours works too. Also I made an input routine a while ago, if you'd like I can search for it.i will try to add the code tomarrow. its already 11:00 pm right now.
.AX3
0=>H
0=>G
3=>B
Lbl 2
getKey=>G
If G=33:H*10H:End
If G=34:H*10=>H:H+1=>H:End
If G=26:H*10=>H:H+2=>H:End
If G=18:H*10=>H:H+3=>H:End
If G=35:H*10=>H:H+4=>H:End
If G=27:H*10=>H:H+5=>H:End
If G=19:H*10=>H:H+6=>H:End
If G=36:H*10=>H:H+7=>H:End
If G=28:H*10=>H:H+8=>H:End
If G=20:H*10=>H:H+9=>H:End
If H (not equal) 0:Output(5,1,H (black triangle) Dec):End
If G (not equal) 9:Goto 2:End
H=>C
If C^2=0:Goto 1:End
While (C/B)(greater than or equal to) squ(C) “squ = square root of”
If C^B=0
Goto 1:End
B+2=>B
End
"PRIME"=>Str1
Disp Str1
Goto (theta)
Lbl 1
"Composite"=>Str2
Disp Str2
Lbl (theta)
Pause 999
0→H→G+3→B
I'm sorry, but what exactly is your program supposed to do? I haven't quite gotten that yet.
One thing I do notice though is that if this is in Axe then lines 3, 4, and 5 can be simplified to:Code: [Select]0→H→G+3→B
sorry about double posting i didn't realizeNormally there isn't a problem with anything unless you do it on purpose multiple times. Here you'll never be banned for a simple little "oops" like this. :)
i am glad to see i wasn't banned for a mistake :)