Factorial in Dart
Example for versions
Dart 1.1.1
This example uses iterative factorial definition.
main() {
int fact = 1;
for (int i = 0; i <= 16; ++i, fact *= i) {
print('$i! = $fact');
}
}
Comments
]]>blog comments powered by Disqus
]]>