#include <stdio.h>
#include<stdlib.h>
int main ()
{
char ch;
int start=1;
int n=1;
while(1)
{
printf("input your line\n") ;
do
{
scanf("%c",&ch);
if(start==1)
{
start=0;
printf("%d.",n);
}
printf("%c",ch);
}while(ch!='\n');
start=1;
n++;
}
}
从标准输入读取几行输入。每行输入都要打印到标准输出上,前面加上行号,使能够处理的输入行的长度没有限制
最新推荐文章于 2020-12-08 10:43:26 发布