Skip to content

Instantly share code, notes, and snippets.

@dora-gt
Forked from VoQn/fizzbuzz.dart
Created October 14, 2011 07:42
Show Gist options
  • Select an option

  • Save dora-gt/1286488 to your computer and use it in GitHub Desktop.

Select an option

Save dora-gt/1286488 to your computer and use it in GitHub Desktop.
Google が Dart 公開したから早速 FizzBuzz
main () {
var tmp = null;
for (var i=0;++i<101;) {
print ((tmp = (i%3?'':'Fizz')+(i%5?'':'Buzz')) == '' ? i : tmp);
}
}
@dora-gt

dora-gt commented Oct 14, 2011

Copy link
Copy Markdown
Author

"String is not assignable to bool" っていうアラートが何か気持ち悪くて…。

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