#include <stdio.h>
#include <string.h>
int main(){
	//定义文件指针
	FILE *fp, *out;
	int i;
	char str[100], out_str[1024];
	fp = fopen("input.txt", "r");//r只读 w覆写 a增加
	out = fopen("out.txt", "w");
	//EOF是文件结束的标记 #define EOF -1
	//fscanf(文件指针, 读取格式, 变量地址) 读到末尾会返回-1
	//fgets(字符串, 最大长度, 文件指针) 读到末尾会返回0 
	while(fgets(str, 100, fp)){
		strcat(out_str, str);
	}
	for(i=0;i<100;i++){
		fprintf(out, "%s\n", out_str);
	}
	
	
	return 0;
}