الگوریتم مقسوم علیه های اول عدد n
#include <iostream>
using namespace std;
int main()
**
int i, p, count, number;
cin>>number;
for(count=1; count<=number; count++)
**
i=1;
p=0;
if(number%count == 0)
**
while(i<=count)
**
if(count%i == 0)
p++;
i++;
}
}
if(p==2)
cout<<count<<" ";
}
return 0;
}
مقسوم علیه های اول n