[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

Answers

Answer 1

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 "Done", "done" or "d"

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:

https://brainly.com/question/24833629

[C++] 4.17 LAB: Print String In Reverse Write A Program That Takes In A Line Of Text As Input, And Outputs

Related Questions

How To Approach Data Center And Server Room Installation?

Answers

Answer:

SEE BELOW AND GIVE ME BRAINLEST

Explanation:

Make a plan for your space: Determine how much space you will require and how it will be used. Consider power requirements, cooling requirements, and potential growth.

Choose your equipment: Based on your unique requirements, select the appropriate servers, storage devices, switches, routers, and other equipment.

Create your layout: Determine the room layout, including rack placement, cabling, and power distribution.

Set up your equipment: Install the servers, storage devices, switches, and other equipment as planned.

Connect your equipment: Connect and configure your servers and other network devices.

Check your systems: Check your equipment to ensure that everything is operating properly.

Maintain and monitor: To ensure maximum performance, always check your systems for problems and perform routine maintenance.

Which statement about a modular power supply is true?

Answers

The true statement about a modular power supply is A. Modular power supplies allow for the customization and flexibility of cable management.

Modular power supplies provide the advantage of customizable cable management. They feature detachable cables that can be individually connected to the power supply unit (PSU) as per the specific requirements of the computer system.

This modular design enables users to connect only the necessary cables, reducing cable clutter inside the system and improving airflow.

With a modular power supply, users can select and attach the cables they need for their specific hardware configuration, eliminating unused cables and improving the overall aesthetic appearance of the system. This customization and flexibility make cable management easier and more efficient.

Additionally, modular power supplies simplify upgrades and replacements as individual cables can be easily detached and replaced without the need to replace the entire PSU.

This enhances convenience and reduces the hassle involved in maintaining and managing the power supply unit.

Therefore, option A is the correct statement about modular power supplies.

For more questions on PSU, click on:

https://brainly.com/question/30226311

#SPJ8

I think this is the question:

Which statement about a modular power supply is true?

A. Modular power supplies allow for the customization and flexibility of cable management.

B. Modular power supplies are less efficient than non-modular power supplies.

C. Modular power supplies are only compatible with specific computer models.

D. Modular power supplies require additional adapters for installation.

Pentagon ABCDE is similar to pentagon QRSTU.
Which side length completes the proportion below to
prove their similarity?

CD/EA = ?/UQ

Answers

Answer:

mente

Explanation:

A network engineer in his office situated in Beijing China was trying to connect a server in
Singapore. He could not connect. Then he tried to connect to a server in his another office branch
in Beijing but also he could not connect to that server. What hardware is causing this problem?
Pinpoint and define that hardware device.​

Answers

Answer:

"Ethernet LAN" causing the given issue. A further explanation is given below.

Explanation:

Ethernet technology should be used throughout the LAN design. The LAN infrastructure could be calculated in advance while using a router and perhaps a secure internet link Network switch, as well as your computer can indeed be attached to something like the LAN.  LAN spreads throughout a local community and therefore could be connected to server machines within the same long separation, so limited that this only encompasses the department as well as property around which the LAN was already constructed.

Which type of evidence should victims collect to help officials catch cyber bullies ?

-home addresses
-birthdays
-social media
-usernames user
-passwords

Answers

Answer:

Social media

Explanation:

Social media and usernames user so that they can find them without any problem : D

algorithm to goto school​

Answers

I think
Wake up
Be ready for school
Then have your break fast
Then take a bus
Then reach to school
Then reach to your class

Can someone tell me what to type up this is for my web page design class

Can someone tell me what to type up this is for my web page design class

Answers

Answer:

You have to write the HTML code as given instructions/design.

Write the below code in text file and save as test.html and run.

Explanation:

<html>

<head>

<title>

Storyboard Practice - Text Formatting

</title>

</head>

<body>

<center>

<h1>

Web Design Overview

</h1>

</center>

</body>

</html>

Can someone give me an example of code of any cartoon character using java applet please help me i need to make my project please☹️​

Answers

The Java code for a cartoon character using java applet is

import java.applet.Applet;

import java.awt.*;

public class CartoonCharacter extends Applet implements Runnable {

   Thread t;

   int x = 0;

   int y = 100;

   

   public void init() {

       setSize(500, 500);

       setBackground(Color.white);

   }

   

   public void start() {

       if (t == null) {

           t = new Thread(this);

           t.start();

       }

   }

   

   public void run() {

       while (true) {

           x += 10;

           repaint();

           try {

               Thread.sleep(100);

           } catch (InterruptedException e) {}

       }

   }

   

   public void paint(Graphics g) {

       g.setColor(Color.red);

       g.fillOval(x, y, 50, 50);

   }

}

How does the code work?

Note that the cartoon character is made like a red circle that navigates accross the screent.

The init() method sets the size of the applet and its background color,    while the      start( ) method creates a new thread and starts the animation loop in the run() method

Learn more about Java Code at:

https://brainly.com/question/29897053

#SPJ1

Which of the following is NOT one of the four benefits of using email?

Answers

Answer:

Can you give choices.

Explanation:

Maintenance is classified into how many categories ?​

Answers

Answer:

hope it helps..

Explanation:

four types.

More information: Adaptive, corrective, perfective and preventive are the four types of software maintenance.

PLEASE THANK MY ANSWER

Consider any tasks performed in real life, for example, driving a taxi. The task you pick involves many functions. Driving a taxi involves picking up customers, and quickly and safely transporting them to their destination. Go through the components of the AI cycle to automate the problem you choose. List the useful precepts available. Describe how you will represent your knowledge. Based on that, describe how you will use reasoning to make and execute a plan expected to achieve a goal or obtain maximum utility. (this is for artificial intelligence, but they did not have that option)​

Answers

The taxi came at night so you go

1. How is the pronoun their used in the second sentence?
The students in Mrs. Powell 's classroom completed the service project in record time. Their
contributions to the community were broadcast on the local news,
A. To link a subject with the word(s)that describes it
B. To replace prepositions
C. To show possession
D. To replace an article like the or an

Answers

The pronoun is used in the second sentence as To link a subject with the word(s)that describes it.

What is a pronoun?

This is known to  be a word or phrase that is said to be used to replace a noun or noun phrase.

Note that in the above sentence, the pronoun " their" is used to The pronoun is used in the second sentence as To link a subject with the word(s)that describes it as it tells more about service project.

Learn more about pronoun from

https://brainly.com/question/395844

#SPJ1

The OSHA Publication
explains 8 rights that
workers have under the
OSH Act.

Answers

The OSHA Publication explains 8 rights that workers have under the OSH Act is known to be Workers' Rights - OSHA.

What is Workers' Rights - OSHA?

This is known to be the making of the Occupational Safety and Health Administration (OSHA) and it is one that was said to be done in 1970

This is one that tends to provide all  workers with their right to be in a safe and healthful work environment.

Hence, The OSHA Publication explains 8 rights that workers have under the OSH Act is known to be Workers' Rights - OSHA.

Learn more about OSHA Publication from

https://brainly.com/question/13708970

#SPJ1

Conditionals often run on {} instructions.

A
if / else

B
if / then

C
unless / until

D
up to / at least

Answers

Answer: A

Explanation: This is a if/else Statement

In any programming language, the code has to make decisions and carry out actions depending on different inputs.

D
Question 11
A binary search tree (BST) is a linked-node based binary tree which stores key-value
pairs (or just keys) in each node.
Find/Search/Get in a binary search tree with n nodes has an expected runtime
of O(log n) for balanced trees.
O True
1 pts
False

Answers

Answer:

True

Explanation:

Neview of related literature happens in two wayo (1) Traditional and
review
svatematic revion is for (2)
traditional for (3)
Avio statistical results makes you use (4)
kind of
systematic review Th e materials to review are general reference, primary
rofononoon and (5)
review
through meta-analysis
given
by
studies, not by (8)
that are characterized
by dissimilar research aspects. Whatever studios thestatistical results
from, these should
be (9)
-based
results meaning they are based on facts Not giving importance to proofs or
evidence, you nesort to presenting literature review results in (10)​

Answers

Answer:

I dont know the question all i know is the answers or whatever

Explanation:

How I can change a string to char in c# console application

How I can change a string to char in c# console application

Answers

Mahesh Chand is the string value for this; char[] charArr = phrase Console.WriteLine(ch); ToCharArray(); foreach (char ch in charArr);

Should I use string or char *?

It is nearly always best to use std::string. Prior to dynamically allocating more space for longer strings, it uses a short array on the stack for performance. In many circumstances, however, char* pointers are still required for putting strings or other data into a raw buffer (such as during network I/O), as std::string cannot be used in these instances.

Is the string method replace ()?

One, some, or all of the matches of a pattern may be replaced by a replacement in the new string that the replace() method returns. The replacement can be a string or a function called for each match, and the pattern can be either a string or a RegExp. Only the first instance of pattern will be returned if it is a string.

To know more about string value visit:-

https://brainly.com/question/8818816

#SPJ1

GAME DESIGN
If you are designing a video game that will primarily be played on a smartphone or tablet, what considerations about the operation or control methods should you keep in mind?

Answers

If you are designing a video game that will primarily be played on a smartphone or tablet, the considerations about the operation or control methods that you should  keep in mind are:

The Orientation of the device; The processing power of the device; andThe size of the device in relation to the spacing of the controlls.

What are video games?

As a result, there is a growing need for mobile app development services and mobile app development companies. As a result of this demand, various smartphone app development businesses promise to provide excellent services.

Regardless of phone manufacturer improvements, there are still uses for the game design process, such as:

Feature Creep IssueNot Targeting the Correct AudienceGetting the Game NoticedManaging Security ConcernsOperating System Fragmentation.Creating the Monetization ModelUpkeep.

Learn more about video games:
https://brainly.com/question/28060919
#SPJ1

what is arithmetic unit​

Answers

Answer:

The arithmetic unit is a component of the central processing unit and it allows the computer to perform mathematical calculations

This is what I know about it hope it helps ♡

What was the Internet originally created to do? (select all that apply)

Answers

The Internet was initially constituted for various purposes. it is was   originally created to options a, c and d:

share researchcommunicateshare documentsWhat is Internet

Communication: The Internet was planned to aid ideas and data exchange 'tween analysts and chemists. It proposed to combine various calculating and networks to authorize logical ideas and cooperation.

Research and Development: The Internet's production was driven for one need to share research verdicts, experimental dossier, and possessions among academies, research organizations, and administration institutions.

Read more about Internet here:

https://brainly.com/question/21527655

#SPJ4

You have read about the beginnings of the Internet and how it was created. What was the Internet originally created to do? (select all that apply)

share research.

Play games.

Communicate.

Share documents.

Sell toys

Which keyboard command would you use to navigate to the left adjacent cell in a worksheet?

Answers

Answer:

Either scroll on a mouse or use the left arrow key.

I don't know if this is right.

Answer:

shift+tab

Explanation:

true or false. Two of the main differences between storage and memory is that storage is usually very expensive, but very fast to access.​

Answers

Answer:

False. in fact, the two main differences would have to be that memory is violate, meaning that data is lost when the power is turned off and also memory is faster to access than storage.

Which of the following is not a characteristic of Web 2.0?
a. blogs
O b. interactive comments being available on many websites
O c. mentorship programs taking place via the internet
d. social networking

Answers

Answer:

c. mentorship programs taking place via the internet

Explanation:

The World Wide Web (WWW) was created by Tim Berners-Lee in 1990, which eventually gave rise to the development of Web 2.0 in 1999.

Web 2.0 can be defined as a collection of internet software programs or applications which avails the end users the ability or opportunity to share files and resources, as well as enhance collaboration over the internet.

Basically, it's an evolution from a static worldwide web to a dynamic web that enhanced social media. Some of the examples of social media platforms (web 2.0) are You-Tube, Flickr, Go-ogle maps, Go-ogle docs, Face-book, Twit-ter, Insta-gram etc.

Some of the main characteristics of Web 2.0 are;

I. Social networking.

II. Blogging.

III. Interactive comments being available on many websites.

Also, most software applications developed for Web 2.0 avails its users the ability to synchronize with handheld or mobile devices such as smartphones.

However, mentorship programs taking place via the internet is not a characteristic of Web 2.0 but that of Web 3.0 (e-mentoring).

The option that is not a characteristic of Web 2.0 from the following is mentorship programs taking place via the internet.

What is Web 2.0?

Web 2.0 speaks volumes about the Internet applications of the twenty-first millennium that have revolutionized the digital era. It is the second level of internet development.

It distinguishes the shift from static web 1.0 pages to engaging user-generated content. Web 2.0 websites have altered the way data is communicated and distributed. Web 2.0 emphasizes the following:

User-generated content, The convenience of use, andEnd-user inter-operability.

Examples of Web 2.0 social media include:

Face book, Twi tter, Insta gram etc

With these social media and web 2.0 websites;

It is possible to create a personal blog,Interact with other users via comments, and Create a social network.

Therefore, we can conclude that the one that is not part of the characteristics of Web 2.0 is mentorship programs taking place via the internet.

Learn more about web 2.0 here:

https://brainly.com/question/2780939

6.10) Write a c program to model a simple calculator. Each data line should consist of the next operation to be performed from the list below and the right operand. Your Accumulator's initial value SHOULD be 0. You need a function scan_data with two output parameters that returns the operator and right operand scanned from a data line. You need a function do_next_op that performs the required operation and saves the value in accumulator. do_next_op takes in the operand, value and accumulator. The valid operators are: + add e.g input => + 5.0 - subtract e.g input => - 5.0 * multiply e.g input => * 5.0 / divide e.g input => / 5.0 ^ power e.g input => ^ 5.0 q quit e.g input => q 0 Note: Numbers in your output should be rounded to 1 decimal place. SAMPLE RUN #4: ./Calculator Interactive Session Show Invisibles Highlight: None Show Highlighted Only Enter the statement:+ 5.0 Result so far is 5.0 Enter the statement:- 2 Result so far is 3.0 Enter the statement:* 4 Result so far is 12.0 Enter the statement:/ 2.0 Result so far is 6.0 Enter the statement:^ 2 Result so far is 36.0 Enter the statement:q 0 Final result is 36.0

Answers

The next two functions defined by the program are scan data and do next op. The task of retrieving the operator and operand from user input is handled by scan data.

What does c in a calculator's full form mean?

Just the C and CE functions on a calculator have the potential to be a little confusing when used. An entry may be deleted or cleared using either button. The C (clear) button will clear all input to the calculator, whereas the CE (clear entry) button will clear the most recent entry.

'#include stdio.h'

'math.h' is included.

0.0 double accumulator;

scan data = void (char* operator, double* operand) Enter the following statement here: printf("Enter the statement: "); scanf("%s%lf", operator, operand);

Standard: printf ("Invalid operatorn"); printf ("Result so far is%.1lfn", accumulator);

char operator; double operand; int main();

the following: scan data(&operator, &operand);

If the operator is equal to "q," then break; then do next op(operator, operand); while (1);

"Final result is%.1lfn," printed using the accumulator;

returning 0;

To know more about functions visit:-

https://brainly.com/question/28939774

#SPJ1

Which feature is used to change the appearance of all slides of a presentation at one go? A. ruler B. Slide Master C. slide layout D. placeholder E. Slide Sorter

Answers

The feature that is used to change the appearance of all slides of a presentation in one go is called the "Slide Master" (Option B)

What is the slide master and why is it important?

Slide Master is a function in Microsoft PowerPoint that allows you to build slide templates. Slide Master has the ability to store slide layouts, including the background, color, fonts, effects, placement, and so on.

With Slide Master, you can alter any of the formatting for your presentation at once and it will be applied to all slides instantaneously; for example, you may change the font of the title or text, the kind of bullets used, add an image to the backdrop, add an image to every slide, and so on.

Learn more about Slide Master:
https://brainly.com/question/8777080
#SPJ1

Perform a bubble sort on the following unsorted list:
3 2 5 6 4 1
In each blank, enter the list after the given iteration. Put one space between each pair of numbers. Do not put commas or any other character in your response besides the numbers and spaces. Do not put a space at the beginning or end of your response.
1. What will the list be after the first iteration of bubble sort?
2. What will the list be after the second iteration of bubble sort?
3. What will the list be after the third iteration of bubble sort?
4. What will the list be after the fourth iteration of bubble sort?
5. What will the list be after the fifth iteration of bubble sort?

Answers

Answer:

3 2 5 6 4 1

2 3 5 4 1 6

2 3 4 1 5 6

2 3 1 4 5 6

2 1 3 4 5 6

1 2 3 4 5 6

Explanation:

After each iteration, one more element at the end of the list is at its final position.

The bubble sort of the unsorted list after one iteration each is:

3 2 5 6 4 12 3 5 4 1 62 3 4 1 5 62 3 1 4 5 6

What is a Bubble Sort?

This refers to the simple sort algorithm that makes a sweep through a list to properly sort elements that are in improper order and loops until the list is sorted.

Hence, because one iteration is needed, there would be a new element added until the end of the list when they are all in their final position and no commas are used.

The complete answer is:

5. 2 1 3 4 5 66. 1 2 3 4 5 6

Read more about bubble sort here:

https://brainly.com/question/14944048

#SPJ2

Which of the following is a log management tool?

Answers

ANSWER -

One of the most popular log management tools is ELK stack, which is a combination of Elasticsearch, Logstash, and Kibana. Other popular log management tools include Splunk, Graylog, Fluentd, and Sumo Logic.

Why did the spelling and grammar checkers in Word miss the errors highlighted in yellow?


please help, im vv confused

Answers

Answer:

I do believe that it is a grammar mistake.

Who is responsible for having Account/Relationship level Business Continuity Plan (BCP) in place?

Answers

The responsibility for having an Account/Relationship level Business Continuity Plan (BCP) in place usually lies with the company or organization providing the service or product. This is because they are responsible for ensuring the continuity of their operations and minimizing the impact of disruptions on their customers. However, it is also important for customers to have their own BCPs in place to ensure their own business continuity in case of a disruption. Ultimately, it is a shared responsibility between the service provider and the customer to have robust BCPs in place.

In a business or organizational context, the responsibility for having an Account/Relationship level Business Continuity Plan (BCP) in place typically falls on the account manager or relationship manager.

What is the Business

Account/relationship level BCP is a plan made specifically for a client or customer account or relationship to deal with their special needs and risks.

These plans are really important for businesses that have important clients or relationships to make sure that they can keep providing necessary services or products even if something unexpected happens like a natural disaster, cyberattack, or emergency.

Read more about Business  here:

https://brainly.com/question/18307610

#SPJ2

how do I make my own algorithms ​

Answers

Answer:

Step 1: Determine the goal of the algorithm. ...

Step 2: Access historic and current data. ...

Step 3: Choose the right model(s) ...

Step 4: Fine tuning. ...

Step 5: Visualise your results. ...

Step 6: Running your algorithm continuously.

Get a basic understanding of the algorithm.
Find some different learning sources.
Break the algorithm into chunks.
Start with a simple example.
Validate with a trusted implementation.
Write up your process.
Other Questions
What is Roy's December Medicare taxable income? Question 8 2 pts What is Roy's December FUTA taxable income? 2 pts Question 9 What is Roy's December SUTA taxable income for Indiana? Prior 11 months wages - Gross: Federal taxable: Social Security taxable: Medicare taxable: FUTA & SUTA $153,500 $136,900 $140,700 $140,700 Over Cap mber gross pay: $13,600 3. Roy December gross pay $4,900 Roy's deduction from regular pay: a. Medical insurance premium b. Federal taxes garnishment C. FSA - dependent care $250 $700 $400 Calculate: An objects weight is determined by its mass (m) and the acceleration due to gravity (g) affecting that object: w = mg. On Earth, g = 9.8 m/s 2 . What are the masses (in kilograms) of the three objects on the Gizmo? (Note: 1 N = 1 kg m/s 2 ) How is cheese made and what type of milk is used? In the biology lab you have just finished a dissection, you should do all of the following EXCEPT: Throw all used slides in the trash, Clean the work table with a 10% bleach solution, Wrap your specimen in the original wrapping and give to your instructor to dispose of., Place used gloves and cleaning supplies in biohazard bag. The manager of a grocery store wants to determine what proportion of people who enterhis store are his regular customers. What size sample should he take so that at 95%confidence the margin of error will not be more than 0.1? Why might a project manager avoid using technical language when giving a presentation to clients? 30x30 becuse i need a better answer question 37 john has subscribed to a cloud-based service to synchronize data between his smartphone, tablet, and pc. before allowing the data to be sy I don't understand this problem...like how to combine the k terms or how to get the answer. Q22 give correct answer in 10 mins i will thumb upthanksQUESTION 22 On January 1, Castagno Corporation had 1,600,000 ordinary shares with a $10 par value outstanding. On March 31, the company declared a 15% share dividend Market value was $15/share. As a r Assuming p: she is beautiful,q :she is clever,the verbal form of ~p^ (~q) is she is beautiful but not clever. she is beautiful and clever she is not beautiful and not clever.she is beautiful or not clever. If the Galapagos Islands were extremely tiny, would Darwin's finches be able to adapt to such extreme climatic shifts? Why or why not? a child has painful, fluid-filled vesicles on the upper lip. what medication does the nurse anticipate teaching parents about? Which is physical hazard?BacteriaMoldCleanerFilet Bone to supplement the auditors' assessments of the risk of material misstatements for the accounts payable assertions, auditors may need to obtain further evidence by Amber wrote a computer program that generates two random numbersbetween on and 12. When she runs it, what is the probability that both valueswill be 11? When selling a 10-year old unit in a common interest development such as condominiums, stock cooperatives, or planned developments, which form must be used Short Answer: EXPLAIN why or why not a monarch would be a good choice to rule/reign/govern the U.S.A.? I help on this question:Graph the function 50,000(1.15)^10 and 100,000(1.15)^8 and identify the y-intercept and the equation of the asymptote Write an expression for the phrase:The difference of twice a number (n) and 3