50分,求助!!!
查看原帖
50分,求助!!!
819372
Eagle2012楼主2023/12/30 21:46
#include<bits/stdc++.h>
using namespace std;

string a, b;
int main() {
	cin >> a;
	b = a;
	int x = 1;
	reverse(a.begin(), a.end());
	for (int i = 0; i < a.length(); i++) {
		if (b[i] = a[i]) {
			continue;
		} else {
			x = 0;
		}
	}

	if (x = 1) {
		cout << "yes";
	} else {
		cout << "no";
	}
	
	return 0;
}
2023/12/30 21:46
加载中...