Answer:
int main ()
{
int arr[10], i, p=0, c, prime=0;
for(i=0;i<10;i++)
{
cout<<"Enter an integer:";
cin>>arr[i];
}
cout<<"The prime numbers are:\\";
for(i=0;i<10;i++)
{
if(arr[i]>1)
{
p=1;
for(c=2;c<arr[i];c++)
{
if(arr[i]%c==0)
{
p=0;
break;
}
}
}
if(p==1)
{
cout<<arr[i]<<" is a prime number.\\";
prime++;
}
}
cout<<"total prime numbers entered by the user are: "<<prime;
}
Step-by-step explanation:
this should be good