Advertisement
MeehoweCK

Untitled

Oct 4th, 2020
1,003
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.  
  3. using namespace std;
  4.  
  5. string odwroc_kolejnosc(string tekst)
  6. {
  7.     string wynik = "";
  8.  
  9.     for(int i = tekst.size() - 1; i >= 0; --i)
  10.         wynik += tekst[i];
  11.     return wynik;
  12. }
  13.  
  14. int main()
  15. {
  16.     string slowo = "SPADOCHRON";
  17.     cout << odwroc_kolejnosc(slowo) << endl;
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement