fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string tekst = "owocowot";
  7. string odwrot;
  8.  
  9. for(int i=tekst.size()-1;i>=0;i--)
  10. odwrot = odwrot + tekst[i];
  11.  
  12. if (tekst==odwrot) cout << "Palindrom";
  13. else cout << "Nie palindrom";
  14. return 0;
  15. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Nie palindrom