📄 6-2.txt
字号:
#include<stdio.h>
int main(void)
{
int letter=0,blank=0,digit=0,other=0;
char ch;
while(1)
{
ch=getchar();
if(ch=='\n')
break;
if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
letter++;
else if(ch==' ')
blank++;
else if(ch>='0'&&ch<='9')
digit++;
else
other++;
}
printf("letter=%d,blank=%d,digit=%d,other=%d\n",letter,blank,digit,other);
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -