Can someone explain to me the step by step the process of tr
Can someone explain to me the step by step the process of tracing an algorithm to me?
Do a trace of the values of the variable k in the following (somewhat arbitrary) algorithm fragment. In the box; list the values (separated by commas) that k assumes throughout the algorithm fragment. Note that order matters!Solution
intial value of k = 7
in for loop first calutation is j=1
k = 7-1^2
k = 6
now in while loop , k=6<10*1
so k = 12 comes out of while loop,
now same repeats for j = 2 and j=3
