You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
4 years ago | |
---|---|---|
README.md | 4 years ago | |
判断素数 | 4 years ago | |
斐波那契数列 | 4 years ago | |
输出菱形 | 4 years ago |
README.md
Collectionofmultiplefunctions
#include<stdio.h> int main(int argc,char *argv[]) { int digit=0,space=0,letter=0,other=0; char c; while((c=getchar())!='\n') if( c<='9' && c>='θ') digit++; else if((c<='z' && c>='a') || (c<='Z' && c>='A') ) letter++; else if( c ==' ') space++; else other++; } printf("%d %d %d %d\n",letter,digit,space,other); return 0;