NOJ/68/main.c

14 lines
272 B
C
Raw Normal View History

2020-08-31 16:46:43 +00:00
#include <stdio.h>
int main(void){
FILE *fpr = fopen("DATA5612.CPP","r");
FILE *fpw = fopen("DATA5612.TXT","w");
char string[1024], count = 1;
while(fgets(string,1024,fpr) != NULL){
fprintf(fpw,"%04d %s",count++,string);
}
fclose(fpr);
fclose(fpw);
return 0;
}