#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define sayi 5978
int main(){
FILE *ptr,*ptr2;
char a[sayi];
char b=' ';
int i=0,k=0;
ptr=fopen("d://1.txt","r");
ptr2=fopen("d://2.txt","w");
if(ptr==NULL){
printf("Dosya Yok");
}
else{
for(i=0;i<sayi;i++){
fread(&a[i],sizeof(char),1,ptr);
fwrite(&a[i],sizeof(char),1,ptr2);
if(a[i]=='.'){
for(k=1;k<7;k++){
fread(&a[i+k],sizeof(char),1,ptr);
fwrite(&a[i+k],sizeof(char),1,ptr2);
}
i=i+6;
fprintf(ptr2,"%c",' ');
}
printf("%c",a[i]);
}
}
fclose(ptr);
fclose(ptr2);
}
Hiç yorum yok:
Yorum Gönder