Advertisement
pan7nikt

Odwrocenie_Wyrazu

Mar 4th, 2020
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. //Podajemy wyraz. Program wypisuje go od tylu
  2. #include <iostream>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int i;
  7. string wyraz;
  8.  
  9. int main()
  10. {
  11.     cout << "Podaj wyraz: ";
  12.     cin >> wyraz;
  13.     for(i=wyraz.length();i>=0;i--)
  14.     {
  15.         cout << wyraz[i];
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement