for loop in C++

Curly brace is optional. If for loop doesn't contain curly braces, only one statement following the for loop belongs to loop body.
```
#include <iostream>
using namespace std;
 
int main() {
  int counter, first, last, next;
  first = 1; last = 2;

  for (counter = first; counter <= last; counter++) {
    cout << "\n " << counter;
    next = counter * counter;
    cout << " " << next;
  }
}
```