标签:字符串及行数
#include <stdio.h> #include <stdlib.h> int main() { int line; int ch; int begining; line=0; begining=1; while ((ch=getchar()) !=EOF) { if (begining==1) { begining=0; line+=1; printf("%d",line); } putchar(ch); if (ch==‘\n‘) begining=1; } return 0; }
本文出自 “乘法口诀” 博客,请务必保留此出处http://10706002.blog.51cto.com/10696002/1704325
标签:字符串及行数
原文地址:http://10706002.blog.51cto.com/10696002/1704325