Question: sum : = 0 for i = 1 to 4 for j = 1 to i sum : = sum + ( i - j

sum :=0 for i =1 to 4 for j =1 to i sum := sum +(i - j) End-for End-for a) For the iteration of the outer loop where i=3, how many times does the inner loop execute? (6 points) b) How many times is the variable sum updated in total? (7 points) c) What is the final value of sum after the entire program runs? (7 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!