Explain logic of for loop
The ' for' statement gives three optional parameters separating by semicolons. First is variable for counting the loop iteration. Usually:int i =0;
Second one is a conditional statement representing if loop continue to loop. If the answer of this statement is true then continue. We usually check the value of the variabe created in the previous section.
the third section is usually is a changer to the first variable, statement . Actually this statement will be execute after all statements in the 'for' current itteration executed.