Question: Write a C++ program named hw1_2.cpp that implement a function named stringSplosion basically a string explosion! How does it work? Well, based on the size
Write a C++ program named hw1_2.cpp that implement a function named stringSplosion basically a string explosion! How does it work? Well, based on the size of string, the stringSplosion function will create a new string where portions of the spring are concatenated together until the entire string in added (it may be easier to jump to the example to see what I mean). Within the stringSplosion function, you wont be printing anything out, just returning the new exploded string.
2. (10 points) Write a C++ program named hw1_2.cpp that implement a function named stringSplosion... basically a string explosion! How does it work? Well, based on the size of string, the stringSplosion function will create a new string where portions of the spring are concatenated together until the entire string in added (it may be easier to jump to the example to see what I mean). Within the stringSplosion function, you won't be printing anything out, just returning the new exploded string. Here is your prototype: string stringSplosion (string str); Create a driver (a main file) which asks the user for a string, and then print the stringSplosion version. Sample execution: Enter a string to explode: Code Code exploded is CCoCodCode. This is another sample execution. Enter a string to explode: abc abc exploded is aababc. This is another sample execution. Enter a string to explode: ab ab exploded is aab
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
