I have this code/program which displays the possible factors of a given value:


Code:

:0->dim(L1
:Prompt N
:For(I,1,sqrt(N
:If not(fPart(N/I
:N/I+I.01->L1(1+dim(L1
:End
:For(I,1,dim(L1
:{0,1->L2
:{0,L1(I->L3
:LinReg(ax+b) L2,L3,Y1
:Equ>String(Y1,Str1
:inString(Str1,".
:Disp sub(sub(Str1,1,Ans-1)+" * "+sub(Str1,Ans+1,length(Str1)-Ans),1,length(Str1)-1
:End


Is their a way to remove the zeros?

For example, if the answer is displayed:

N=?96
96 * 01
48 * 02
32 * 03
24 * 04
16 * 06
12 * 08
Done

I want it to be displayed as:

N=?96
96 * 1
48 * 2
32 * 3
24 * 4
16 * 6
12 * 8
Done
I'm still working on the question you asked, but as a side note, on line 7, you have "length(L1" where you mean "dim(L1"
Yes it is "dim(L1"

Whoops...
Have you tried the Fix1 setting? That might solve your problem.
Akon: I replied to you on TI-BD here. I provided code that does the same thing that you want.
Problem Solved on http://tibasicdev.wikidot.com/forum/t-1116724/please-help-me-to-create-a-ti-calc-program

Thread Closed...
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
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

 

Advertisement