#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char ch = 0;
int turn = 1;
int count = 0;
while ((ch = getchar()) != EOF) //getchar一个一个的字符读取
{
if (turn == 1)
{
turn = 0; //开关,保证count每次只能输出一次
count++;
printf("%d ", count);
}
putchar(ch); //保证每次输出一次count,然后getchar一个一个读取,打印,,,,,
if (ch == '\n') //遇到了\n,表示要换行了,开关打开,在输出新的一行
{
turn = 1;
}
}
system("pause");
return 0;
}#define _CRT_SECURE_NO_WARNINGS 1
#include<stdi