Sum of prime numbers

Print sum of all prime numbers within a given range.

Input : range - an integer value n

Output - Sum of first n prime numbers

Example :

Input : 6

Output : (2+3+5+7+11+13 = ) 41

Author: Amit Khandelwal 1
Login to Answer
Sort By:
Oldest
|
Newest
|
Vote
|
My Answer