0

Need help creating a C++ program generating prime numbers.

prime numbers program that generates range between upper and lower limit entered by user. program diaplays total quantity of prime numbers and their sum. help needed.

2nd May 2017, 5:23 AM
Naveed
Naveed - avatar
5 Respostas
+ 3
count++;
2nd May 2017, 7:11 AM
Tob
Tob - avatar
+ 3
int low, high; for (int i = low; i <= high; i++) { //your method }
3rd May 2017, 2:17 AM
Krishneel Nair
Krishneel Nair - avatar
+ 2
Did you try to solve it and if so, where are you stuck?
2nd May 2017, 6:41 AM
Tob
Tob - avatar
0
I m able to make result appear, but all numbers are appearing individually, I want to tell total quantity of prime numbers
2nd May 2017, 6:47 AM
Naveed
Naveed - avatar
0
for sum I use sum= sum +i; what will I use for total quantity?
2nd May 2017, 6:50 AM
Naveed
Naveed - avatar