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
alisha [4.7K]
3 years ago
6

Write the definition of a function named rcopy that reads all the strings remaining to be read in standard input and displays th

em, one on a line with no other spacing, onto standard output IN REVERSE ORDER. So if the input was: here comes the sun the output would be sun the comes here The function must not use a loop of any kind (for, while, do-while) to accomplish its job.

Computers and Technology
1 answer:
pickupchik [31]3 years ago
5 0

Answer:

//Include this header file if program is executing on //visual studio.

#include "stdafx.h";

//Include the required header file.

#include <iostream>

#include <string>

//Use the standard namespace.

using namespace std;

//Define the function rcopy.

void rcopy()

{

    //Declare a string variable to store the string.

    string s;

    //Prompt the user to input the string.

    cin >> s;

    //Check if the string entered by the user reach to

    //the next line character.

    if (cin.get() == '\n')

    {

         //Display the last word in the string.

         cout << s << " ";

         //Return from the if statement.

         return;

    }

    //Make a recursive call to the function rcopy.

    rcopy();

    //Display the remaining words in the string in

    //the reverse order.

    cout << s << " ";

}

//Start the execution of the main method.

int main()

{

    //Call the function rcopy.

    rcopy();

    //Use this system command to hold the console screen      //in visual studio.

    system("pause");

    //Return an integer value to the main function.

    return 0;

}

Explanation:

See attached images for the code and output

You might be interested in
? Question<br> How are the Internet and the World Wide Web different from each other?
KengaRu [80]

Answer:There just different

Explanation:

The world wide web, or web for short, are the pages you see when you're at a device and you're online. But the internet is the network of connected computers that the web works on, as well as what emails and files travel across. ... The world wide web contains the things you see on the roads like houses and shops.

4 0
3 years ago
The rules of right-of-way<br> Pedestrians, bicyclists, and skateboarders<br> when they use the road.
lorasvet [3.4K]

Whenever you are driving and you see a pedestrian, bicyclist, or skateboarder, they always have the right of way, no matter the scenario. Always give bikers 3-4 feet if possible between them and your vehicle when passing them, and always be careful around skateboarders.

I hope this helped you! Have a great day!

7 0
3 years ago
Self-contained sequences of actions to be performed are: (1 point)
beks73 [17]
These are functions.
6 0
3 years ago
Read 2 more answers
Which of the following represents a transition?
timama [110]

Explanation:

C.

D.

395 - 44th Street Long B.

Ο Α

O

B

С

OD

8 0
3 years ago
Smoking is a REALLY good example of a choice that can have negative effects on the smoker's health, AND the well-being of others
kow [346]
There is not a question but I will say thanks, because I learned something!!! lucky me I don't have to worry because I am allergic to alcohol and tabacco
8 0
3 years ago
Other questions:
  • Select the correct answer from each drop-down menu.
    8·1 answer
  • Alter the line of (10, 20) and (18, 30) en dpoints by (2, 3) scale factor, then move it by (5, 9) translate factor using matrix
    13·1 answer
  • To prevent injury when pulling a nail be sure the material holding the nail is
    14·1 answer
  • A man has a set of n keys, one of which fits the door to his apartment. He tries the keys randomly, throwing away each ill-fitting
    10·1 answer
  • Which of the following is not a protocal? <br><br>A) HTTP<br>B) FTP<br>C) WWW<br>D) HTTPS​
    15·2 answers
  • Technician A says that high pressure in recycled refrigerant is only caused by air contamination. Technician B says that recycle
    15·1 answer
  • What are the steps to creating a blank database? Use the drop-down menus to complete them.
    9·1 answer
  • FOR DIGITAL DESIGN/ PHOTOGRAPHY
    5·2 answers
  • Consider the following code:
    13·1 answer
  • Discusse five advantages of utilising DBMS over a file based system
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!