It is not a simple repetition of "repeat ◯◯ times", but a little advanced repetition can be done by doing the following.
//Start loop variable from 1
for (int i = 1; i < 10; i++){...}
//Increase the loop variable by 2
for (int i = 0; i < 10; i += 2){...}
//Decrease the loop variable from 10 to 1 by 1
for (int i = 10; i > 0; i--){...}
//Do not initialize loop variables
for (; i < 10; i++){...}
//Do not perform repetitive processing
for (int i = 0; i < 10;){...}
Recommended Posts