Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
rstring
//g++ 5.4.0 #include <iostream> #include <string> using namespace std; string reverse (string str) { char temp; for (int i=0; i<(str.length())/2; i++) { temp= str[i]; str[i] = str[str.length()-i-1]; str[str.length()-i-1] = temp; } return str; } int main() { cout<<reverse("E-MUMBA")<<endl; }
run
|
edit
|
history
|
help
0
Complexity O(n/2)
by Muhammad Bilal, 3 years ago
Please
log in
to post a comment.
Metodos 2- programa3
Dead_Lock
Cotton Farm 0.0.1.0
string
cotton farm 0.0.1.0
variadic pointer to function template
Treap for spoj : MEANARR (we can use policy based data structures instead)
10 wizards-DFS_vector
BridgeEdge
C++ Solar eclipse program(Shoushi integrated) 1644 - 1785 from Ideone( Date: August 14, 2014 )
Complexity O(n/2)
by Muhammad Bilal, 3 years agoPlease log in to post a comment.