Advertisement
Nazmul_Hasan_Moon

Comments

Apr 23rd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include<bits/stdtr1c++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. freopen("cmntin.txt","r",stdin);
  6. freopen("cmnto.txt","w",stdout);
  7. char ch;
  8. bool t=0;
  9. while(cin>>ch)
  10. {
  11. t=0;
  12. if(ch=='/'){
  13. cin>>ch;
  14. if(ch=='*')
  15. {
  16. while(cin>>ch)
  17. {
  18. if(ch=='*'){
  19. cin>>ch;
  20. if(ch=='/')
  21. t=1;
  22. }
  23. if(t)
  24. break;
  25. }
  26. }
  27. if(t==0)
  28. cout<<'/'<<ch;
  29. }
  30. else
  31. cout<<ch;
  32. }
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement