Computer Science Canada

how do i find the sum of 10 numbers in the array in turing?

Author:  kid105 [ Tue Jan 12, 2010 10:24 pm ]
Post subject:  how do i find the sum of 10 numbers in the array in turing?

What is it you are trying to achieve?
<Replace all the <> with your answers/code and remove the <>>


What is the problem you are having?
<Answer Here>


Describe what you have tried to solve this problem
<Answer Here>


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


<Add your code here>



Please specify what version of Turing you are using
<Answer Here>

Author:  Euphoracle [ Tue Jan 12, 2010 10:30 pm ]
Post subject:  RE:how do i find the sum of 10 numbers in the array in turing?

When you iterate through the array, you will have access to each value. Sum them.

scheme:

var sum : %fill this in

%iterate using a for-loop
for i : % fill this in
        sum := %fill this in
end for


: