Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- FILE *f1;
- FILE *f2;
- FILE *f3;
- f1=fopen("slowa.txt", "r");
- f2=fopen("ch.txt", "w");
- f3=fopen("samoh.txt", "w");
- char slowo[30];
- int i=0;
- int j=0;
- while(fscanf(f1,"%c", &znak)!=EOF)
- {
- for(i=0;i<strlen(slowo);)
- {
- if(slowo[i]==h)
- fprintf(f3, %s, slowo);
- else
- i++;
- for(j=0;j<strlen(slowo);)
- {
- if(slowo[j]==c)
- fprintf(f2, %s, slowo);
- else
- j++;
- }
- }
- }
- fclose(f1);
- fclose(f2);
- fclose(f3);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement