Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #include <string>
- using namespace std;
- int main(int argc, char *argv[])
- {
- int a,b,i,j;
- string palindrom;
- if (a >= 1 && a <= 99)
- {
- a*a = b;
- cin >> palindrom = b;
- }
- if else
- {
- return 0;
- }
- for (i = 0, j = wyraz.length()-1; i < j; i++, j--)
- {
- if (wyraz[i] != wyraz[j])
- break;
- }
- if (i < j)
- cout << "Podany wyraz nie jest palindromem" << endl;
- else
- cout << "Podany wyraz jest palindromem" << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement