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
Mapas - convertir número telefónico
C++ Array printing
Search a 2D Matrix
random
Two-phase sample with GCC
Riemann's prime number formula
Web Browser History - LIST
Samosa
aaaaaaaaaaaa
List add v2