Question: This incorrect program should sum together all of the numbers in both inputs, array 1 and array 2 , and returns that sum as the
This incorrect program should sum together all of the numbers in both inputs, array and array and returns that sum as the output totalSum. You can assume array and array have same length. Which one of the following statements is a reasonable correction? Note: the correction may not fully fix the function
function totalSum programToFixarray array
totalSum ; s
n arrayl;
for ::
totalsum arrayi arrayi totalSum;
end
In the line with the comment : The code should read totalSumi arrayi arrayi;
In the line with the comment : The code should read :: n
In the line with the comment : The code should read ::
In the line with the comment : tota Sum should be initialized as
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
