直接上代码:
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,h,q,a,b;
cin>>n;
h=n%100; a=n/1000;
b=n/100%10; q=a*10+b;
if(h==q){
cout<<"YES";
}else{
cout<<"NO";
}
return 0;
}
直接上代码:
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,h,q,a,b;
cin>>n;
h=n%100; a=n/1000;
b=n/100%10; q=a*10+b;
if(h==q){
cout<<"YES";
}else{
cout<<"NO";
}
return 0;
}