Write a program in C++ 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: Hello there Hey quit then the output is: ereht olleH yeH

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter17: Linked Lists
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

Write a program in C++ 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:

Hello there Hey quit

then the output is:

ereht olleH yeH

LAB
4.24.1: LAB: Print string in reverse
0/10
ACTIVITY
main.cpp
Load default template...
1 #include <iostream>
2 using namespace std;
4 int main() {
5
6.
/* Type your code here. */
7
8
return 0;
9 }
10
Transcribed Image Text:LAB 4.24.1: LAB: Print string in reverse 0/10 ACTIVITY main.cpp Load default template... 1 #include <iostream> 2 using namespace std; 4 int main() { 5 6. /* Type your code here. */ 7 8 return 0; 9 } 10
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Algebraic Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning