Skip to content

Instantly share code, notes, and snippets.

@Headmast
Created October 1, 2020 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Headmast/af07cb413cc71277a90e2b527cfeda4c to your computer and use it in GitHub Desktop.
Save Headmast/af07cb413cc71277a90e2b527cfeda4c to your computer and use it in GitHub Desktop.
void evenNumbers() {
  print('Print all even number');
  for (int i = 0; i <= 100; i = i+2) {
    print(i);
  }
}
@artem-zaitsev
Copy link

Хорошее, красивое решение) Можно еще сделать через if (i.isEven) {} , но это прям красиво.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment