1//'i' can be any number
2//Can be any comparison operater
3//can be any number compared
4//can be any mathmatic operater
5
6for (int i = 0; i<100; i++){
7//Do thing
8}
9
10//more info on operaters
11//https://www.w3schools.com/cpp/cpp_operators.asp
1
2
3
4for (int i = 0; i < 10; i++){
5 //Do something as long as i is less than 10,
6 //In that case it will loop 10 times
7 //use break; to restart the loop whenever you want to cancel the loops.
8 cout << i;
9
10 //at the end, remember i will be increased by 1.
11}
12
13//output 0123456789
1for (/* init var */;/* break condition */;/* mathmatic operation */) {
2 // do something
3}