不知所云的江


私信TA

用户名:yehongjiangcpp

访问量:7260

签 名:

select * from student;

等  级
排  名 884
经  验 3459
参赛次数 0
文章发表 10
年  龄 0
在职情况 学生
学  校 School Of Caliton
专  业

  自我简介:

select * from student;


//问题 1251: 统计字母个数
#include <iostream>
using namespace std;

int main(){
	int a[26] = {0};
	char ch;
	ch = cin.get();
	while(ch!='#'){
		if(ch>='a'&&ch<='z') a[ch-'a']++;
		ch = cin.get();
	} 
	for(int i=0;i<26;i++){
		cout<<static_cast<char>(i+'a')<<' '<<a[i]<<endl;
	}
	return 0;
}


 

0.0分

0 人评分

  评论区