Advertisement
Guest User

Untitled

a guest
May 26th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main ()
  5. {
  6. char s[80];
  7. int c, flag;
  8. FILE *in;
  9. FILE *out;
  10. in=fopen("in.txt", "r");
  11. if (in==0)
  12. {
  13. fclose (in);
  14. return -1;
  15. }
  16. out=fopen("out.txt", "w");
  17. if (out==0)
  18. {
  19. fclose (in);
  20. fclose (out);
  21. return -1;
  22. }
  23. while ((c = fgetc(in))&&(c!=EOF))
  24. {
  25. if (c=='/')
  26. {
  27. c=fgetc(in);
  28. while (c!='/')
  29. {
  30. c=fgetc(in);
  31. }
  32. continue;
  33. }
  34. fputc (c, out);
  35. }
  36.  
  37. fclose (out);
  38. return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement