Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <windows.h>
- #define SLEEP {Sleep(2000); system("cls"); Sleep(500);}
- int main(){
- FILE *fr, *fw;
- int c;
- if((fr = fopen("poviedka.htm", "r")) == NULL){
- printf("Subor sa nenasiel!");
- SLEEP;
- main();
- }
- else{
- printf("Subor uspesne otvoreny!");
- SLEEP;
- }
- fw = fopen("poviedka_repaired.htm", "w");
- while((c = getc(fr)) != EOF){
- if(c == 165)
- c = 188;
- else if(c == 169)
- c = 138;
- else if(c == 171)
- c = 141;
- else if(c == 174)
- c = 142;
- else if(c == 181)
- c = 190;
- else if(c == 185)
- c = 154;
- else if(c == 187)
- c = 157;
- else if(c == 190)
- c = 158;
- putc(c, fw);
- }
- fclose(fr);
- fclose(fw);
- printf("Subor je opraveny!");
- SLEEP;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement