mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
fixed lint
This commit is contained in:
parent
d6d328c8c9
commit
fb3a8091f9
@ -1,23 +1,20 @@
|
|||||||
#include <iostream>
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
using namespace std;
|
int main() {
|
||||||
|
int num;
|
||||||
|
std::cout << "Enter number = ";
|
||||||
|
std::cin >> num;
|
||||||
|
|
||||||
int main()
|
std::string s1 = std::to_string(num);
|
||||||
{
|
std::string s2 = s1;
|
||||||
int num;
|
|
||||||
cout << "Enter number = ";
|
|
||||||
cin >> num;
|
|
||||||
|
|
||||||
string s1 = to_string(num);
|
reverse(s1.begin(), s1.end());
|
||||||
string s2 = s1;
|
|
||||||
|
|
||||||
reverse(s1.begin(), s1.end());
|
if (s1 == s2)
|
||||||
|
std::cout << "true";
|
||||||
|
else
|
||||||
|
std::cout << "false";
|
||||||
|
|
||||||
if (s1 == s2)
|
return 0;
|
||||||
cout << "true";
|
|
||||||
else
|
|
||||||
cout << "false";
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user