(Solved):Provide trace tables for this loop: i=10, j=0, n=0 while i 0, i=i-1, j=j+1, n=n+i-j View Answer…

 

Question

Provide trace tables for this loop:

i=10, j=0, n=0

while i>0, i=i-1, j=j+1, n=n+i-j

 

EXPERT ANSWER

Trace table for the given loop would be:

i j n
9 1 8
Scroll to top