I need help with this textbook problem Thank you How many it
I need help with this textbook problem!
Thank you!
How many iterations will the following for loops execute? for (int i = 0; iSolution
a) for(int i=1;i=20;i++) { }
executes 20 times.
b) for(int i=1;i<=20;i++) { }
executes 20 times.
c) for(int i=5;i<20;i++) { }
executes 15 times.
d) for(int i=20;i>0;i--) { }
executes 20 times.
e) for(int i=1;i<20;i=i+2) { }
executes 10 times.
f) for(int i=1;i<20;i*=2) { }
executes 5 times.
