SelinD

126?

May 23rd, 2019
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int ap[100],aux,n,r=0,i;
  6. cin>>n;
  7. n=aux;
  8. while(aux)
  9. {
  10. ap[aux%10]++;
  11. aux=aux/10;
  12. }
  13. for(i=9;i>=0;i--)
  14. {
  15. r=r*10+i;
  16. ap[i]--;
  17. }
  18. if(n==r)
  19. cout<<"nu exista";
  20. else
  21. cout<<"exista";
  22. }
Add Comment
Please, Sign In to add comment