#include<bits/stdc++.h> using namespace std; int main(void) { string s,str; int i,j; while(getline(cin,s)) { for(i=0;i<s.size();++i) { if(isalpha(s[i])) str+=s[i]; else { cout<<str<<s[i]; str=""; } } cout<<str<<endl; } } |
Double click to view unformatted code.