CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
using namespace std;
int main() {
string s;
getline(cin,s);
cout<<"You entered: "<<s<<" .And now it is: ";
for(char c:s){
if(c!=' ')
cout<<c;
}cout<<" .";
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run