#include<bits/stdc++.h> using namespace std; string symbol=”<>+-*/=()[]{!|&~%^;:?,.”; int main(){ cout<<“把要改码风的代码放在本代码同路径下,命名为text.cpp,fmtext.cpp为本代码修改后的输出文件!\n注意:本代码只删空格不删换行!\n”; system(“pause”); freopen(“text.cpp”,“r”,stdin); freopen(“fmtext.cpp”,“w”,stdout); string xxs; while(1){ getline(cin,xxs); for(int i=0;i<xxs.size();i++){ bool flg=1; if(xxs[i]==’ ’){ for(int j=0;j<symbol.size();j++){ if(i-1>=0){ if(xxs[i-1]==symbol[j]){ flg=0; } } if(i+1<xxs.size()){ if(xxs[i+1]==symbol[j]){ flg=0; } } } } if(flg){ cout<<xxs[i]; } } if(xxs!=""){ cout<<endl; } } }