#include <stdio.h>
int main()
{
int ch;
int count;
FILE *fp = freopen("in.txt","r",stdin);
char buf[1024];
fp = stdin;
/* 跳過第一行 */
fgets(buf, sizeof(buf), fp);
count = 1;
while (fgets(buf, sizeof(buf), fp)) {
/* 檢測最後一行 */
if (EOF != (ch = fgetc(fp))) {
ungetc(ch, fp);
printf("%6d\t%s", ++count, buf);
} else {
break;
}
}
return 0;
}