Guest User

Proposed edit to http://stackoverflow.com/a/1510186/849891

a guest
Dec 30th, 2013
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.26 KB | None | 0 0
  1.     Enumerable.Range(0, Math.Floor(Math.Sqrt(num)) ).Aggregate(
  2.         Enumerable.Range(2, num).ToList(),
  3.         (result, index) => {
  4.             result.RemoveAll(i => i > result[index] && i % result[index] == 0);
  5.             return result;
  6.         }
  7.     );
Add Comment
Please, Sign In to add comment