摘要: 要使用STL中的算法,需要在程序头文件引入#include <algorithm> 1.对基本类型的数组从小到大排序: sort(数组名+n1,数组名+n2); n1和n2都是int类型的表达式,可以包含变量 如果n1=0,则 + n1可以不写 将数组中下标范围为[n1,n2)的元素从小到大排序。下 阅读全文
posted @ 2017-11-05 21:41 WY~记录 阅读(824) 评论(0) 推荐(0) 编辑
摘要: 对一段英文文本的信息,统计其中大写字母,小写字母,空格,标点符号的个数 <?php$manuscript = "Where there is a will, there is a way.";//字符串文本$smallLetter = 0;$capitalLetter = 0;$blank = 0; 阅读全文
posted @ 2017-11-05 11:14 WY~记录 阅读(1165) 评论(0) 推荐(0) 编辑