#include <stdio.h>
int main()
{
int ch = 0;
int line = 1;
int flag = 1;
while ((ch = getchar()) != EOF)
{
if (flag)
{
printf("%d", line);
line++;
flag = 0;
}
if (ch == '\n')
{
flag = 1;
}
putchar(ch);
}
return 0;
}
转载于:https://blog.51cto.com/10706198/1758196