Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main(){
- bool zm=true;
- string wyraz;
- cin>>wyraz;
- int dl=wyraz.size();
- for(int i=0;i<dl/2;i++){
- if(wyraz[i]!=wyraz[dl-1-i]){
- zm=false;
- break;
- }
- }
- if(zm==true) cout<<"Palindrom";
- else cout<<"Nie jest palindromem";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement