Advertisement
Guest User

Untitled

a guest
Sep 12th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import 'dart:async';
  2. import 'dart:math' show Random;
  3.  
  4. main() async {
  5.   print('Compute π using the Monte Carlo method.');
  6.   await for (var estimate in computePi().take(500)) {
  7.     print('π ≅ $estimate');
  8.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement