mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
ac1ba3a613
* rename Others -> temp * rename Others -> others
24 lines
281 B
C++
24 lines
281 B
C++
#include <iostream>
|
|
#include <algorithm>
|
|
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
int num;
|
|
cout << "Enter number = ";
|
|
cin >> num;
|
|
|
|
string s1 = to_string(num);
|
|
string s2 = s1;
|
|
|
|
reverse(s1.begin(), s1.end());
|
|
|
|
if (s1 == s2)
|
|
cout << "true";
|
|
else
|
|
cout << "false";
|
|
|
|
return 0;
|
|
}
|