1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Oduvanchick [21]
2 years ago
8

[C++] 4.17 LAB: Print string in reverse 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 "Done", "done", or "d" for the line of text. Ex: If the input is: Hello there Hey done then the output is: ereht olleH yeH
Computers and Technology
1 answer:
Readme [11.4K]2 years ago
7 0

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

You might be interested in
Which of the following is true about parallel computing performance?
Ierofanga [76]

Answer:

Computations use multiple processors. There is an increase in speed.

Explanation:

The increase in speed is loosely tied to the number of processor or computers used.

Mark me a brainliest answer

4 0
2 years ago
Your website is currently at position 5 in organic search. On a monthly basis you currently get on average 5,432 clicks and 32 c
Natalka [10]

Answer:

Answered

Explanation:

This one is worth if I can get more number of clicks and the conversions.

SEO plays a vital role in bringing the website ahead of the competition. In the long run, if a website can reach their target audience with the organic search, then it saves a lot spending over the paid campaigns to bring business. Bringing the website to first position will automatically increase the impression which in turn will result in the more clicks and conversions.

7 0
3 years ago
Which action will help you protect data in your computer in case of an earthquake?
Len [333]

Answer:

Explanation: 13

8 0
3 years ago
Read 2 more answers
When a support agent does not know the answer to a question, a good incident management strategy is to tell the user ____.
laiz [17]

When you don't know the answer to a question, a good incident management strategy is to tell the user that you'll research the question and get back to him or her.

<h3>What is incident management?</h3>

Incident management can be defined as a strategic process through which a business organization or company identifies, analyzes, and correct hazards, so as to ensure that normal service operation is restored as quickly as possible to end users after a disruption, as well as to prevent a re-occurrence of these hazards in the future.

As a support agent, if you don't know the answer to a question, a good incident management strategy is to tell the user that you'll research the question and get back to him or her at a latter time.

Read more on incident management here: brainly.com/question/11595883

4 0
2 years ago
Which of the following is a benefit of a digital network?
k0ka [10]

Answer:

Multiple devices can be connected

8 0
2 years ago
Other questions:
  • What is the very first thing a user usually must do to gain access to a secure computer?
    7·1 answer
  • What are the different between Facebook and LinkedIn
    15·2 answers
  • Which line in the following program contains the header for the showDub function? 1 #include«iostream» 2 using namespace std; 4
    15·1 answer
  • What are static components in a multimedia system?
    15·2 answers
  • To determine the average of a range of numbers, click the ____ in the formula bar, then click average.
    13·1 answer
  • Explain three specific &amp; major security threats to internet users. In each case, address whether or not the vulnerabilities
    15·1 answer
  • What software application is most appropriate to use to create multimedia presentations?
    6·2 answers
  • HW2.24. Statement: Area of a Triangle The area of a triangle can be computed by knowing the base and height of the triangle usin
    11·1 answer
  • What impact download speeds on different computers
    13·1 answer
  • A form of segmentation that is based on user usage rate, user status, purchase occasion, and benefits sought is _________.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!