subject

Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters "Quit", "quit", or "q" for the line of text. Ex: If the input is: (see image attached)

my code is this one but i dont know what im doing wrong:

#include
using namespace std;
int main()
{

while (true)
{
string word;

if (word. compare("Quit")==0)
{
break;
}
else if (word. compare("quit")==0)
{
break;
}

int len=word. length();

cout = 0; i--)
{
cout << word[i];
break;
}
cout << endl << endl;
}
cout << "Thank You..!";
return 0;
}


Write a program that takes in a line of text as input, and outputs that line of text in reverse. Th

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:30
Which of the following is not a symptom of chronic fatigue syndrome
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
question
Computers and Technology, 23.06.2019 04:00
Write a method that takes in an array of point2d objects, and then analyzes the dataset to find points that are close together. be sure to review the point2d api. in your method, if the distance between any pair of points is less than 10, display the distance and the (x,y)s of each point. for example, "the distance between (3,5) and (8,9) is 6.40312." the complete api for the point2d adt may be viewed at ~pf/sedgewick-wayne/algs4/documentation/point2d.html (links to an external site.)links to an external site.. try to write your program directly from the api - do not review the adt's source code.
Answers: 1
question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
You know the right answer?
Write a program that takes in a line of text as input, and outputs that line of text in reverse. The...
Questions
question
Mathematics, 06.04.2020 22:16
Questions on the website: 13722367