Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- char x,y;
- printf("Unesite znakove x i y: ");
- scanf(" %c %c",&x,&y);
- if(x>y){
- printf("Pogresan unos");
- return 1;
- }
- FILE* ulaz=fopen("input.txt","r");
- if(ulaz==NULL){
- printf("Datoteka ne postoji");
- return 1;
- }
- FILE* izlaz=fopen("output.txt","w");
- int c;
- while((c=fgetc(ulaz))!=EOF){
- for(;c!=EOF && c>=x && c<=y;c=fgetc(ulaz))
- fputc(c,izlaz);
- }
- fclose(ulaz);
- fclose(izlaz);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement