Consider the following program and answer the following
for(int I =1; I<=10; I+=3)
printf ("%d\n"I);
How many times the for loop executed?
1
Expert's answer
2019-09-17T06:34:22-0400
Minimal value of l is 1 and maximal value is 10. Every execution of loop l grows up by 3. It means that the loop will be executed only four times(i=1, i=4, i=7, i=10)
Comments
Leave a comment