Guest User

Untitled

a guest
Nov 19th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5.  
  6. bool Check(char* _Array)
  7. {
  8. int Temp = -1;
  9. int Mod[10] = {};
  10. for (int i = 0; i < strlen(_Array);i++)
  11. {
  12. Temp = (_Array[i]) % 10;
  13. Mod[Temp]++;
  14. }
  15. for (auto j : Mod)
  16. {
  17. if (j != 1)
  18. {
  19. return false;
  20. }
  21. }
  22. return true;
  23. }
  24.  
  25. void main()
  26. {
  27. cout << Check("0123456789") << endl;
  28. cout << Check("01234") << endl;
  29. cout << Check("01234567890") << endl;
  30. }
Add Comment
Please, Sign In to add comment