Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n,p,d,dp,i,m;
- cout<<"n="; cin>>n;
- cout<<"p="; cin>>p;
- m=n;
- for(d=2; d<=n/2; d++)
- {
- if(n%d==0)
- dp=dp+1;
- }
- if(dp+2<p)
- for(i=2;i<=m/2; i++)
- {
- if(m%i==0)
- cout<<i<<" ";
- }
- else
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement