0

Whenever I attempt to run a program on my Ti-89 that stores a number or a sequence into a list, the list is always deleted after the program is run. I have tried this sort of thing on a Ti-84, and the number is successfully stored. I was perhaps thinking that it may be due to a specific formatting error. An example program below:

mn()
Prgm
31->c
While c>0
If remain(sqrt(c^2*(c+1)),1)=0
Then
c->list2
EndIf
c-1->c
EndWhile
EndPrgm

Perhaps the number is not stored into the next blank cell and the entire list is cleared/deleted? I know on the Ti-84, one can simply use: c->L2(1+dim(L2)) Which does not seem to work on the Ti-89. Has anyone else had experience with this issue before?

4

1 に答える 1

1

に要素を追加するのではなく、 の内容に置き換えlist2ます。 list2c

最初:c->list2[1+dim(list2)]動作します。括弧ではなく、89 のリストのインデックス付けに角括弧を使用するだけです。

2 つ目:1->iループの開始時にカウンターを保持し、次に
c->list2[i] : i+1->i値ごとに保持することができます。

3 番目:augment(list2,{c})->list2これも動作しますが、おそらくこれまでで最も高価です。

于 2015-12-16T17:02:54.570 に答える