?? number.c
字號:
/*
** Copy the standard input to the standard output, and number the
** output lines.
*/
#include <stdio.h>
#include <stdlib.h>
int
main()
{
int ch;
int line;
int at_beginning;
line = 0;
at_beginning = 1;
/*
** Read characters and process them one by one.
*/
while( (ch = getchar()) != EOF ){
/*
** If we're at the beginning of a line, print the
** line number.
*/
if( at_beginning == 1 ){
at_beginning = 0;
line += 1;
printf( "%d ", line );
}
/*
** Print the character, and check for end of line.
*/
putchar( ch );
if( ch == '\n' )
at_beginning = 1;
}
return EXIT_SUCCESS;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -