For loop c++
#include <iostream>
int main() {
// Initialization: executed once at the beginning
// Condition: checked before each iteration, if false, exit loop
// Increment/Decrement: executed after each iteration
for (int i = 0; i < 5; ++i) {
// Body: code to be executed in each iteration
std::cout << "Iteration " << i + 1 << std::endl;
}
return 0;
}