Calculate value of an element based on values of others elements of the same array

Say I have a temp array with 3 elements and I change the values of the first 2 elements using a for loop constantly. Is it possible to calculate a value with the values of the first 2 elements and assign it to the third element automatically?
Within the loop that changes the values of the first 2 elements, the third can be calculated.


Have you example code?
Topic archived. No new replies allowed.