新建文本文档 (3).txt

来自「里面有几个很有意思的数学应用程序」· 文本 代码 · 共 19 行

TXT
19
字号
#include <stdio.h>  
main()  
{  
char c;  
int letter=0,space=0,digit=0,others=0;  
printf("please input some characters\n");  
while((c=getchar())!='\n') 
{if(c>='a'&&c<='z'||c>='A'&&c<='Z') 
letter++;  
else if(c==' ')  
space++;  
else if(c>='0'&&c<='9')  
digit++;  
else  
others++;  
}  
printf("all in all:letter=%d space=%d digit=%d others=%d\n",letter,space,digit,others);  
getch();  
} 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?