C语言编程:统计字符串中各字母出现的次数

日期:2018-03-07 14:32:50 人气:1

C语言编程:统计字符串中各字母出现的次数

//--------------------------------------------------------------------------- #include #include int main(void) { int a[26]={0}; int i; char c; while ((c=getchar())!='\n') if (isalpha(c)) a[tolower(c)-'a']++
    A+
热门评论