Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- void nrdiv(int n,int &d1,int &d2)
- {
- d2=INT_MIN,d1=INT_MAX;
- int d=2,p;
- while(n>1)
- {
- p=0;
- while(n%d==0)
- {
- p++;
- n=n/d;
- }
- if(p>0)
- {
- if(d>d2) d2=d;
- if(d<d1) d1=d;
- }
- d++;
- }
- }
- int main()
- {
- int a,b,d1,d2,i;
- cin>>a>>b;
- for(i=a; i<=b; i++)
- {
- nrdiv(i,d1,d2);
- if(d1>=10 && d2<=99) cout<<i<<" ";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement