by calling thread
i want 500 of the array on cpu and the other 500 elements of array on another cpu parallel
this is the code to find prime numbers in array of 1000 elements
please help meCode:#include <iostream> using namespace std; int main () { int prime, range=1000; int n; for ( prime = 2; prime<=range; prime++ ) { for ( n=2; n < prime; n++ ) if (prime%n==0 ) break; if ( n==prime ) cout << prime << endl; } return 0; }