+ 6
WAP in C++ to print n prime numbers using arrays
store the prime numbers in an array before displaying
5 Answers
+ 15
@ Swapnil Srivastava, it seems to be a homework đđ
+ 10
Homework ?
+ 6
Perhaps this will help:
It's function check number and if it's prime return true
bool simple(int n)
{
for (int i = 2; i <= n / 2; i++) if ((n%i) == 0) return false;
return true;
}
+ 6
I edited my comments đ
look again