2018年10月25日

摘要: 所需头文件 #include <algorithm> string str="how are you" ; transform(str.begin(),str.end(),str.begin(),::toupper); toupper 全转大写,tolower全转小写。 count(news.beg 阅读全文
posted @ 2018-10-25 09:33 crush111 阅读(302) 评论(0) 推荐(0) 编辑
 
摘要: 内容一是比较简单的if语句和循环的使用,没有什么好说的。 内容二我使用了两种方法对这篇新闻计数,第一种是用了string类型。将全部文章内容转化为大写字母,然后用count函数实现对单个字母的计数,然后用循环来实现对26个字母的计数。第二种方法是用char类型 使用循环中cin.get()来实现对每 阅读全文
posted @ 2018-10-25 09:31 crush111 阅读(106) 评论(0) 推荐(0) 编辑