[TIB] Re: greatest integer??
[Prev][Next][Index][Thread]
[TIB] Re: greatest integer??
if you want a routine for it( in case you don't want to change the order
fo the list) here is one that is pretty short code but might take a while
for longer lists.
:list[1]->b
:For a,1,dim(list)
:When(list[a]>b,list[a],b)->b
:EndFor
When this is over this will store the largest numebr in the list as 'b',
you can replace the middle line with When(list[a]>b,a,b)->b to store the
place in the list of the largest number. That code was for the TI-89, so
it will not work on the other calcs due to them not haveing that command
so here it is written more universal.
:list1[1]->b
:for(a,1,dim(list1))
:If list1[a]>b
:list1[a]->b
:End
That should work for the TI-83/83+, haven't played with the other calcs
much. The second might even be faster for the 89 cause each cycle isn't
forced to make a check and a store, try 'em both.
Jesse
________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com