FANDOM


:sum(list)

This adds all the values in a list

:sum(list,start,end)

This adds all the values of a list between the specified two indexes.

LocationEdit

  • 2ND + STAT (LIST)
  • MATH
  • 5:sum(

ExampleEdit

:I=1
:0→dim(L1)
:Disp "NUMBER SUMMER"
:Disp "","ENTER 0 TO","END INPUT"
:Input "NUMBER",I
:
:While I≠0
:Input "NUMBER",I
:dim(L1)+1→dim(L1)
:I→L1(dim(L1)-1)
:End
:
:Disp "THE SUM IS",sum(L1)

This program inputs a bunch of numbers until 0 is entered, and places them in a list. At the end, the sum of the list is displayed.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.