?? test7_10.txt
字號:
#include <stdio.h>
#define WORD_BEGIN 1
#define END_WORD 0
#define OUT 1
#define IN 0
int main(void)
{
int c, characters, lines, words, state;
state=OUT;
characters=words=lines=0;
while((c=getchar())!=EOF)
{
characters++;
switch(c)
{
case'\n': lines++;
state=OUT;
break;
case' ': state=OUT;
break;
case'\t': state=OUT;
break;
default:
if(state==OUT)
{
state=IN;
words++;
}
break;
}
}
printf("%d %d %d\n", characters, words, lines);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -