Challenge: Remove Whatever is White!
Hands-on exercise to test our knowledge.
We'll cover the following...
We'll cover the following...
Problem statement
You are given a function iswhitespace and our task is to write a function deletewhitespaces that takes a string as input and removes all its whitespaces. For this problem, whitespace is defined as the set of characters "\t\r\n\v\f".
Implement the delws function using the given code as a reference.
Note: Use
uniqueand string functions{erase, shrik_to_fit}to perform the task.
Input
A single line of input consisting of a string s that can contain any printable ASCII character.
Output
After removing all whitespaces, a single output line consists of the modified string.