#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; }
时间: 2024-11-08 02:08:30