Write a simple program in C++ that lets the user input a single integer n where 1 ≤ n ≤ XXXXXXXXXXThe program should print the sum of the first n prime numbers. In the first example below, the first 5...


Write a simple program in C++ that lets the user input a single integer
n
where 1 ≤ n ≤ 100000. The program should print the sum of the first n prime numbers. In the first example below, the first 5 prime numbers are 2, 3, 5, 7, and 11.



Example #1:


Enter integer: 5


Prime sum: 28



Example #2:


Enter integer: 100000


Prime sum: 62260698721



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here