WAP 10 numbers and print sum of prime numbers only(pls tell in c++)
Answers
Answered by
1
Answer:
#include<iostream.h>
int main( )
{ int n, I, count, s=0;
cout<<"Enter any 10 numbers:"<<endl;
for(n=1;n<=10;n++)
{count=0;
for ( i=2;I<=n/2;i++)
{if (n%i==0)
count++;
break;}}}
Explanation:
it is somewhat right
there is 2 years gap for me about c++
so i almost forgot all
Similar questions