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 <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
int num;
|
||||
cout << "Enter number = ";
|
||||
cin >> num;
|
||||
std::cout << "Enter number = ";
|
||||
std::cin >> num;
|
||||
|
||||
string s1 = to_string(num);
|
||||
string s2 = s1;
|
||||
std::string s1 = std::to_string(num);
|
||||
std::string s2 = s1;
|
||||
|
||||
reverse(s1.begin(), s1.end());
|
||||
|
||||
if (s1 == s2)
|
||||
cout << "true";
|
||||
std::cout << "true";
|
||||
else
|
||||
cout << "false";
|
||||
std::cout << "false";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user