Skip to content

Commit bc8b86e

Browse files
authored
Merge pull request ashutosh97#106 from samuel-tonini/master
Added Dart implementation of Fizz Buzz
2 parents e0ee592 + 4f099f7 commit bc8b86e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Fizz Buzz/dart_solution.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
main() {
2+
for (int i = 1; i <= 100; i++) {
3+
if (i % 15 == 0) {
4+
print('fizzbuzz');
5+
} else if (i % 5 == 0) {
6+
print('buzz');
7+
} else if (i % 3 == 0) {
8+
print('fizz');
9+
} else {
10+
print(i);
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)