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
TransposeMatrix
cppPyClassMethod
g++ -Wall *.cpp -o aco; ./aco.
ამოცანა#3-------From adjacency matrix to the list of edges.
Sort row sorted matrix
2015(M2)Mod.
Segmented Sieve
Travel Buddy
KJ
Triangle