Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <iostream>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main(int argc, char *argv[])
  7. {
  8. int a,b,i,j;
  9. string palindrom;
  10. if (a >= 1 && a <= 99)
  11. {
  12. a*a = b;
  13. cin >> palindrom = b;
  14. }
  15. if else
  16. {
  17. return 0;
  18. }
  19. for (i = 0, j = wyraz.length()-1; i < j; i++, j--)
  20. {
  21. if (wyraz[i] != wyraz[j])
  22. break;
  23. }
  24. if (i < j)
  25. cout << "Podany wyraz nie jest palindromem" << endl;
  26. else
  27. cout << "Podany wyraz jest palindromem" << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement