Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool cifre(int numar)
- {
- int c=numar%10;
- while(numar)
- {
- if(numar%10==c)
- numar/=10;
- else
- break;
- }
- return (numar==0);
- }
- void identice(int a,int b)
- {
- bool ok=false;
- for(int i=a;i<=b;++i)
- if(cifre(i))
- ok=true,cout<<i<<' ';
- if(!ok)
- cout<<"nu exista";
- }
Add Comment
Please, Sign In to add comment