fixed lint

This commit is contained in:
Krishna Vedala 2020-05-26 09:26:40 -04:00
parent d6d328c8c9
commit fb3a8091f9
No known key found for this signature in database
GPG Key ID: BA19ACF8FC8792F7

View File

@ -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;
} }