Untitled
unknown
c_cpp
3 years ago
348 B
4
Indexable
#include<stdio.h> #include<iostream> #include<string.h> #include<bits/stdc++.h> using namespace std; int main(){ string a,b; while(cin>>a){ for(int i=0;i<a.length();i++){ if(a[i]>='a'&&a[i]<='z'){ a[i]=a[i]-'a'+'A'; } } b=a; reverse(a.begin(),a.end()); if(a==b){ printf("1\n"); } else{ printf("0\n"); } } }
Editor is loading...