num 0 for I 1 I Solutionthe output is 20 explanation fori0
Solution
the output is 20
explanation:
for(i=0;i<=3;i++)
 {
 num=num+2;
 for(j=1;j<=3;j++)
 {
 num=num+1;
 }
 }
when i=0 num=2 then it runs for j=1 2 and 3 and num increases 1 by each time.
Hence num becomes 5
when i=1 num=7 then it runs for j=1 2 and 3 and num increases 1 by each time.
Hence num becomes 10
when i=2 num=12 then it runs for j=1 2 and 3 and num increases 1 by each time.
Hence num becomes 15
when i=3 num=17 then it runs for j=1 2 and 3 and num increases 1 by each time.
Hence num becomes 20
Then it exists the loop

