Asked • 03/29/20

Write a program that removes all spaces from the given input.Your program must define and call the following function. The function should return a string representing the input string without spaces.

Write a program that removes all spaces from the given input.

Ex: If the input is:

Hello my name is John.

the output is:

HellomynameisJohn.

Your program must define and call the following function. The function should return a string representing the input string without spaces.

string RemoveSpaces(string userString)

#include <iostream>

using namespace std;


/* Define your function here */


int main() {

/* Type your code here. Your code must call the function. */


return 0;

}


1 Expert Answer

By:

Saqib H. answered • 03/29/20

Tutor
5.0 (48)

PhD in Computer Science with expertise in Python

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.