fork(1) download
  1. #include<iostream>
  2. #include<cctype>
  3. using namespace std;
  4. int main()
  5. {
  6. int index=0;
  7. string sequence1,sequence2;
  8. cout<<"enter the sequence"<<endl;
  9. getline(cin,sequence1);
  10. for(index=0;index<20;++index)
  11. if(!ispunct(sequence1[index]))
  12. sequence2[index]=sequence1[index];
  13. cout<<sequence2<<endl;
  14. return 0;
  15. }
Success #stdin #stdout 0s 3032KB
stdin
asjdhk;jsahd'kjsdhkj;sldkjalsd
stdout
enter the sequence