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
I need help for my computer science class I would appreciate it
kirill115 [55]

Answer:

21

Explanation:

a = 7

b = 7

c = 2

7 is greater than or equal to 7 , so it will return 7 + 7 *2 which is 21

5 0
3 years ago
What is ASP.NET ?why is it important?
miskamm [114]
<span>ASP.NET is an open-source server-side web application framework designed for web development to produce dynamic web pages.

Without it, we would be lost on the internet, or possibly wouldn't even have internet. Whats the point of Wifi without web pages?</span>
6 0
3 years ago
Jake was working on an essay for his English class on a stormy Sunday afternoon. Before he could save his document, a big strike
matrenka [14]

Maybe in atosave, Computers mostly save what your working on :3

8 0
4 years ago
How do you put a fraction into a computer countulater
ad-work [718]

Answer:

i have no clue sorry:(

Explanation:

I didn't do this to get points i promise

3 0
4 years ago
Read 2 more answers
What are the benefits of building blocks?
BartSMP [9]

I'm not sure if this is what you're looking for but you can benefit from using the Building Blocks feature in Word. Building blocks are pieces of document content or pre-defined items, like tables, lists, headers, and text boxes. They can be used again and again in Word files on your computer.

Hope this helps

8 0
3 years ago
Read 2 more answers
Other questions:
  • Jane is a postproduction crewmember for a film. Her responsibilities include arranging all the scenes that have been shot into t
    7·1 answer
  • A company uses the account code 669 for maintenance expense. However, one of the company's clerks often codes maintenance expens
    15·1 answer
  • Enables businesses and consumers to share data or use software applications directly from a remote server over the Internet or w
    6·1 answer
  • This method of advertising is expensive but can be the most effective method.
    15·1 answer
  • you just bought a new hard drive for your computer .you plan to use this as a secondary hard drive to store alll your files. wha
    15·1 answer
  • Write a program to read 10 integers from an input file and output the average, minimum, and maximum of those numbers to an outpu
    14·1 answer
  • Create a function called "strip_r_o" that takes in a STRING and strips all the Rs and Os from the string. Also use a FOR loop in
    7·1 answer
  • A spreadsheet contains the maximum weight and maximum height for fifty dog breeds. The breeds are located in rows, and the weigh
    5·1 answer
  • Write programs in python to display “Valid Voter”. (condition : age of person should be
    15·1 answer
  • Identify the hardware components in your own computer. If you don't have a computer, use a friend's, or one at work or in an NVC
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!