Find the sum of first and last prime numbers in a range programming
Answers
Answered by
0
Answer:
Calculate the sum of the first n prime numbers
Given a non-negative integer n, calculate the sum of the first n primes and output it.
For n=5, the first five primes are:
The sum of these numbers is 2+3+5+7+11=28, so the program has to output 28.
For n=0, the "first zero" primes are none. And the sum of no numbers is - of course - 0.
Answered by
1
Answer:
The range of programming in the first and the last prime numbers .
Similar questions