avukas

cetvrti sa sedmog

May 2nd, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include<algorithm>
  3. #include<string>
  4.  
  5. using namespace std;
  6. string funkcija(string s)
  7. {
  8.     string s1;
  9.     remove_copy(s.rbegin(), s.rend(), back_inserter(s1),' ');
  10.     return s1;
  11. }
  12.  
  13. int main()
  14. {
  15.     string s{"ade la"};
  16.  
  17.     string s1(funkcija(s));
  18.     for(int i=0; i<s1.length(); i++)
  19.     cout << s1[i];
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment