Help solve the problem.

Given two arrays of the same length (10 elements each). Create a third array that will display the sum of the first two arrays. The first element of the third array is equal to the sum of the first elements of the first two arrays, and so on.

  • one
    And where exactly did the difficulties meet? (The answer "in the task" does not roll.) - VladD

1 answer 1

It's simple:

for(int i = 0; i < 10; ++i) { a_target[i] = a_1[i] + a_2[i]; }