Advertisement
Guest User

D

a guest
Oct 18th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string input;
  7. string velke[1000];
  8. string male[1000];
  9. string cisla[1000];
  10. int i=0;
  11. while (cin >> input)
  12. {
  13. for(int j=0; j<input.size(); j++)
  14. {
  15. if(islower(input[j]))
  16. male[i] += input[j];
  17. else if(isupper(input[j]))
  18. velke[i] += input[j];
  19. else if(isdigit(input[j]))
  20. cisla[i] += input[j];
  21. }
  22.  
  23. i++;
  24. }
  25.  
  26. for(int i=0; i<1000; i++)
  27. {
  28. if(male[i]!="")cout << male[i]<<" ";
  29. }
  30.  
  31. for(int i=0; i<1000; i++)
  32. {
  33. if(velke[i]!="")cout << velke[i]<<" ";
  34. }
  35.  
  36. for(int i=0; i<1000; i++)
  37. {
  38. if(cisla[i]!="")cout << cisla[i]<<" ";
  39. }
  40.  
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement