Programming Challenge 9


Description

Using only data structures and algorithms (with lambdas) from the standard library (no loops or named functions), perform the following:
  1. Generate 1,000,000 random doubles in the range [0,1].
  2. Copy elements less than 0.3 or greater than 0.6 into another data structure.
  3. Transform these elements by rounding into integers in another data structure.
  4. Sort the integers in reverse order.
  5. Count (and output) the number of ones and number of zeroes.

Details