The program illustrates the use of string manipulations.
String manipulation involves carrying out several operations (such as splitting and reversing of strings).
The program in C++ where comments are used to explain each line is as follows:
#include <bits/stdc++.h>
using namespace std;
int main(){
//This declares a string variable
string str;
//This gets input for the variable
getline(cin, str);
//The following is repeated, until the user inputs <em>"Done", "done" or "d"</em>
while(str != "Done" && str !="done" && str !="d"){
//This reverses the string
reverse(str.begin(), str.end());
//This prints the reversed string
cout << str<<endl;
//This gets another input
getline(cin, str);
}
return 0;
}
At the end of each loop, the reversed string is printed.
See attachment for sample run
Learn more about similar programs at:
brainly.com/question/24833629