Rearrange the code blocks in the correct order and indent them to create a program that takes a string as input and prints the reverse of the string.
Strings
Correct order
Report a typo
Reorder lines using drag or arrows. Adjust indentation with left buttons
std::string reversedString = "";
int main() {
#include <iostream>
std::cout << "Reversed string: " << reversedString;
std::cout << "Enter a string: ";
std::getline(std::cin, str);
std::string str;
reversedString = myReverseFunc(str);
}
return 0;
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.