#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
int i, j, k;
j=0;
char str[10][100];
FILE * fp=fopen("input.txt","rt");
if(fp==NULL)
{
puts("파일오픈 실패!");
return -1;
}
while(1){
for(i=0;;i++)
{
fscanf(fp,"%c",&str[j][i]);
if(str[j][i]=='\n')
break;
}
if(feof(fp)) break;
str[j][i]='\0';
j++;
printf("%d\n",j);
}//while
FILE * fp1=fopen("output.txt","wt");
if(fp1==NULL)
{
puts("파일오픈 실패!");
return -1;
}
fprintf(fp1,"%s",&str[0][0]);
system("pause");
return 0;
}