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
F we are reduced to a set of computer algorithms, how do we differentiate ourselves from our programming or our connectome? is i
Goshia [24]

Answer:

Answer explained below

Explanation:

The surface biopsychology and the relatively new science of neuroinformatics are fascinating areas of study are the human brain is the most complex computer in existence. Understanding how it works has been a scientific endeavor for centuries combining the newest advances in computer programming with biochemistry computer modeling allows researchers to collect data and anticipate what may happen in a live brain helping them test and develop hypotheses that can be used in conjunction with experiments in the lab.

The reconstruction of neuronal morphology for simulation is difficult and time consuming, although recent advances in scientific software has somewhat simplified the process using the geometry preparation toolkit illustrates how the complex morphology of a neuron impacts the function of the cell Researchers are able to see the effects of the channels opening and the calcium being released both graphically and numerically.Adolescence involves sexual maturity in terms of hormones and physical development of the body.

The psychosocial context of adolescents is markedly different to that of children and adults Adolescents begin to assert more autonomous control over their decisions emotions and actions and start to disengage from parental control

  • Microchips are about the size of a grain of rice and coated with biocompatible glass upon implantation by syringe connective tissue should form to prevent migration.
  • The procedure is very low.

The current market for these devices includes livestock and laboratory animal industries though the technology is quite useful some problems have already surfaced although some of them tend to be identified with specific programs individuals or locations they are presented here as generic.he processes and methods that we use help determine the greater outcome of the venture,there is a unique quality about humans and that is the need for routine like animals humans too feel a sense of calm when falling into a pattern we are upended when we move to a new home or community when we transfer to a different school and when we change jobs even those who feel that they do not fit in as a quintessential member of society still experience the effects of routine.

That individual will have their process which contributes to the overall success of the group this also applies to education.One student may be inclined to study for seven hours before an exam and another may only study for two each possesses their routine.

  • Neuroinformatics leads us currently neuroscientists collect complex data in ever-increasing amounts fostering increased specialization with resultant challenges to integrate data between and across levels of interaction control and function the field should enhance its wealth of ever-increasing empirical data accumulated from its many disciplines and experimental approaches
  • The purpose of analyzing brain ultrastructure is to understand the normal synaptic communication pathway of neurons and supporting cellular elements and the alternations of such pathways and cellular elements caused by diseases.

6 0
3 years ago
Which of the following is not a benefit of introducing an e-commerce solution to an organisation?
emmainna [20.7K]

Answer:

A. Improving human resource management by offering more information to employees about available services, from annual leave arrangements to retirement plans.

Explanation:

e-commerce is a short for electronic commerce and it can be defined as a marketing strategy that deals with meeting the needs of consumers, by selling products or services to the consumers over the internet.

This ultimately implies that, e-commerce is strictly based on the buying and selling of goods or services electronically, over the internet or through a digital platform. Also, the payment for such goods or services are typically done over the internet such as online payment services.

Some of the benefit of introducing an e-commerce solution to an organisation's includes;

I. Improving internal communication by offering various means for exchanging information with minimum effort and cost.

II. Reducing the personalisation of services.

III. Supporting purchasing functions by offering responsive pricing models based on the analysis of market status.

7 0
2 years ago
A(n) _____ bus enables the central processing unit (CPU) to communicate with a system’s primary storage.
Jobisdone [24]
An Address bus enables the cpu to communicate with a system's primary storage.
4 0
3 years ago
Which is better? iPhone 11 Pro Max or Samsung Galaxy Note 20 Ultra 5G and why?
Allisa [31]

Answer:

Samsung note 20 or iPhone but i think Samsung

Explanation:

8 0
3 years ago
Read 2 more answers
21. What is the set of events that occurs between the moment you turn
Fantom [35]

Answer:

The boot loader is pulled into memory and started. The boot loader's job is to start the real operating system. POST (Power On Self Test) The Power On Self Test happens each time you turn your computer on. ... Your computer does so much when its turned on this isn't all that occurs but is a summirazed version of what happens

7 0
3 years ago
Other questions:
  • Which of the following is a school-to-work program that provides the student with paid employment, school credit, and school gra
    7·2 answers
  • In "When Is a Planet Not a Planet?" why does the author say that the outer planets are made of gas when the inner planets are ma
    5·1 answer
  • Name the three basic storage device of a computer​
    6·2 answers
  • In what stage of an algae or fungi life cycle are they able to reproduce spores?
    10·1 answer
  • "What is the capital of Belarus?" is an example of what type of search query
    10·2 answers
  • Which technology will a business use to figure out who accessed confidential files on a company's computer system
    12·1 answer
  • Given the following array definition, write a constant declaration named ArraySize that automatically calculates the size in byt
    5·1 answer
  • If you misspell a word in your Java program it may be true that I. the program will not compile II. the program may compile, but
    6·1 answer
  • java Two smallest numbers Write a program that reads a list of integers, and outputs the two smallest integers in the list, in a
    6·1 answer
  • What is the correct format to use when<br> inserting a date in Excel?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!