// Created by on 15/11/9.// Copyright ? 2015年 小白教程. All rights reserved.
//
#include<stdio.h>intmain(){charc;
intletters=0,spaces=0,digits=0,others=0;
printf("請輸入一些字母:n");
while((c=getchar())!='n'){if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))letters++;
elseif(c>='0'&&c<='9')digits++;
elseif(c==' ')spaces++;
elseothers++;
}printf("字母=%d,數(shù)字=%d,空格=%d,其他=%dn",letters,digits,spaces,others);
return0;
}