Code Examples
A repository of 155 code examples for BeepBeep
|
Use the SlicerMap to compute the sum of odd and even numbers separately. More...
Static Public Member Functions | |
static void | main (String[] args) |
Use the SlicerMap to compute the sum of odd and even numbers separately.
Graphically, this can be represented as:
The expected output of this program is:
{1=1.0} {1=1.0, 6=1.0} {1=1.0, 4=1.0, 6=1.0} {1=1.0, 3=1.0, 4=1.0, 6=1.0} {1=1.0, 2=1.0, 3=1.0, 4=1.0, 6=1.0} {1=2.0, 2=1.0, 3=1.0, 4=1.0, 6=1.0} {1=2.0, 2=1.0, 3=1.0, 4=1.0, 6=1.0, 9=1.0} …
Definition at line 57 of file SlicerOddEven.java.
|
static |
We first setup a stream of numbers to be used as a source
Definition at line 59 of file SlicerOddEven.java.