for loops are easy to use when you already know how many times you need to repeat something. Since initialization, condition, and update all sit on one line, they're a natural fit for counting loops.
c
#include <stdio.h>
int main() {
for (int i = 1; i <= 5; i++) {
printf("Step %d
", i);
}
return 0;
}int i = 1 is the starting value, i <= 5 is the condition that checks whether the loop continues, and i++ increases the value after each pass through the loop.
You should see
Step 1 Step 2 Step 3 Step 4 Step 5Info
When you're looping over an array, remember that indexing starts at 0. For a counting display like this one, though, it's fine to start at 1.