Approach to solving the problem of the sum of the first N primes. Using stream.
Look at this mathematical overview of the problem
The goal is, given, an integer N, to compute the sum of the first prime numbers.
Vaue of N | Expected Results |
---|---|
2 | 5 |
3 | 10 |
4 | 17 |
40 | 3087 |