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 11:00
Technician a says that the radiator usually cools better if the front air dam is removed. technician b says that when a condenser has a leak it can be repaired easily with epoxy. who is correct?
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
If your accelerator suddenly gets stuck what should you do
Answers: 2
question
Computers and Technology, 23.06.2019 09:00
What provides an array of buttons for quick access to commonly used commands and tools
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
20 points archie wants to use a reflector as he photographs a newlywed couple. what would he consider in his choice? a. shadow and sunny b. homemade and professional c. lamps and boards d. incident and reflected e. neutral density and enhancement
Answers: 3
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, 05.11.2020 22:50
question
Mathematics, 05.11.2020 22:50
question
Mathematics, 05.11.2020 22:50
Questions on the website: 13722359