For now ı just copyed all numbers from one to other. But i couldnt short them for now.
Code:
#include<stdio.h>#include<stdlib.h>
#include<conio.h>
int main()
{
FILE *stream1,*stream2;
char c[11];
int sum=0,i=0;
if((stream1=fopen("a.txt","rt"))==NULL)
{ printf("Error opening a.txt!");
fflush(stdin);getchar();exit(-1);}
printf("a.txt file is opened sucsessfuly\n");
if((stream2=fopen("b.txt","w+"))==NULL)
{ printf("Error creating b.txt!");
fflush(stdin);getchar();exit(-1);}
printf("File b.txt has been created.\n");
while(fscanf(stream1,"%c",&c)!=EOF) /* EOF=End Of File */
{
fprintf(stream2,"%c",c);
}
fclose(stream1);
fclose(stream2);
return 0;
}