Advertisement
naskedvi

S4 - zad.26

Apr 24th, 2014
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. void f(std::string s)
  5. {
  6.     std::string novi="";
  7.     for(int i=0; i<s.length(); i++)
  8.     {
  9.         char znak(s[i]);
  10.         novi.push_back(++znak);
  11.     }
  12.     std::cout<<novi;
  13. }
  14.  
  15. int main()
  16. {
  17.     std::string s;
  18.     std::getline(std::cin, s);
  19.     f(s);
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement