Back To C++ Single Dimensional Arrays Index
//program to input array of 10 integer elements and find prime numbers from the array (example of arrays and functions ) #include
#include
void isprime(int a) { int i; int prime=1; for(i=2;i<=a/2;i++) { if(a%i==0) { prime=0; break; } } if(prime==1) { cout<<"\n"<
>a[i]; } for(i=0;i<10;i++) { isprime(a[i]); } getch(); }