We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#include<iostream> #include<string> using namespace std; int main() { string str(""); string newStr(""); cout << "input your message :"; cin >> str; for (int i = (str.length() - 1); i >= 0; i--) { newStr += str[i]; } cout << newStr << endl; cin.ignore(6); }
The text was updated successfully, but these errors were encountered:
啊这~贴代码尽量用上 ``` 格式来标注代码例如:
#include <iostream> #include <string> using namespace std; string reverse(string str) { string newStr; for (int i = str.length() - 1; i >= 0; --i) { newStr += str[i]; } return newStr; } int main() { string str; cout << "input your message :"; cin >> str; cout << reverse(str) << endl; return 0; }
Sorry, something went wrong.
啊这~贴代码尽量用上 ``` 格式来标注代码例如: #include <iostream> #include <string> using namespace std; string reverse(string str) { string newStr; for (int i = str.length() - 1; i >= 0; --i) { newStr += str[i]; } return newStr; } int main() { string str; cout << "input your message :"; cin >> str; cout << reverse(str) << endl; return 0; }
好的,谢谢,现在加上了
No branches or pull requests
The text was updated successfully, but these errors were encountered: