Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5.  
  6. //void deleteRepeats(char arr[10]);
  7.  
  8. int main()
  9. {
  10. string elems;
  11. cout << "Enter array of characters: " << endl;
  12. cin >> elems;
  13.  
  14. int numOfLetters;
  15. cout << "How many elements are in your array?" << endl;
  16. cin >> numOfLetters;
  17.  
  18. char result[10];
  19. for(char letter : elems)
  20. {
  21. if(result[0] == "")
  22. result[0] = letter;
  23. else
  24. {
  25. for(char c : result)
  26. {
  27. if(c != letter)
  28. rec
  29. }
  30. }
  31.  
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement