Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
is_num_palindrom
//Title of this code #include <iostream> #include <cstdio> using namespace std; bool palindrom(string& str) { int i = 0; int j = str.length() - 1; while (i < j) { if (str[i] != str[j]) return false; ++i; --j; } return true; } bool palindrom(int num) { string str = to_string(num); return palindrom(str); } int main() { cout << boolalpha << palindrom(100301); }
run
|
edit
|
history
|
help
0
Test 9(2020)
C++ Test
Stock buy/sell
CPP - Arrays - Ex.2 - Solution
SVGAnimated Value
Scope guarding
Hello world!
informatika / Cinta Avrille X MIPA 5
Inherit
Shuffle algorithm