Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'dart:async';
- import 'dart:math' show Random;
- main() async {
- print('Compute π using the Monte Carlo method.');
- await for (var estimate in computePi().take(500)) {
- print('π ≅ $estimate');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement