In this program, we will take a string as input and remove spaces from a given string.
Steps to solve the program
- Take a string as input.
- Create an empty string.
- Add every character from the input string to the empty string except spaces.
- Print the output.
Output :