What’s your coding style? Imperative or Declarative?

First, to more simplicity, I want to describe them by an example: