SHARE
TWEET

Untitled

a guest Feb 24th, 2020 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<iostream>
  2. #include<string>
  3. using namespace std;
  4. int main()
  5. {
  6. int i,j;
  7. string wyraz;
  8. cout << "Podaj liczbe  ";
  9. cin >> wyraz;
  10. for (i = 0, j = wyraz.length()-1; i < j; i++, j--)
  11. {
  12. if (wyraz[i] != wyraz[j])
  13. break;
  14. }
  15. if (i < j)
  16. cout << "Nie jest palindromem" << endl;
  17. else
  18. cout << "Jest palindromem" << endl;
  19. return 0;
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top