Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<algorithm>
- #include<string>
- using namespace std;
- string funkcija(string s)
- {
- string s1;
- remove_copy(s.rbegin(), s.rend(), back_inserter(s1),' ');
- return s1;
- }
- int main()
- {
- string s{"ade la"};
- string s1(funkcija(s));
- for(int i=0; i<s1.length(); i++)
- cout << s1[i];
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment