Created
November 19, 2020 11:15
-
-
Save internetova/b7893900925e64f10018157befda0724 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Задание 2 | |
// Используя циклы, напишите программу, которая выводит на консоль все четные числа от 0 до 100. | |
void main() { | |
var buffer = StringBuffer(); | |
for (var i = 0; i <= 100; i++) { | |
if (i.isEven) { | |
buffer.write('$i '); | |
} | |
} | |
final evenNumbers = buffer.toString(); | |
print(evenNumbers); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment