#include<stdio.h>
#include<stdlib.h>
int main()
{
char str;
int count = 1;
int start = 1;
while (1)
{
printf("input your line\n");
do
{
scanf("%c", &str);
if (start == 1)
{
printf("%d.", count);
start = 0;
}
printf("%c", str);
} while (str != '\n');
start = 1;
count++;
}
}
C语言:标准输入读取几行输入。每行输入都要打印到标准输出上,前面加上行号。行号不能有限制
最新推荐文章于 2021-05-25 12:38:18 发布