上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 33 下一页
  2021年8月27日
摘要: 1 //交换两个变量的值 2 // 1 3 int nu1 = 10; 4 int nu2 = 20; 5 6 System.out.println("nu1 = "+nu1+"\t"+"nu2 = "+nu2); 7 8 int temp; 9 10 temp = nu1; 11 nu1 = nu 阅读全文
posted @ 2021-08-27 12:45 Bytezero! 阅读(208) 评论(0) 推荐(0)
  2021年8月25日
摘要: 1 /*** 2 * 基本数据类型之间的运算规则 3 * 4 * 前提:7中基本数据类型运算 5 * 6 * 1.自动类型提升: 7 * 当容量小的类型与容量大的数据类型的变量做运算时,结果自动提升为容量大的数据类型 8 * byte、char、short->int->long->float->do 阅读全文
posted @ 2021-08-25 12:21 Bytezero! 阅读(108) 评论(0) 推荐(0)
  2021年8月20日
摘要: 1 /** 2 * 项目名称:机房预约系统 3 * 时 间:2021-08 4 * 作 者:Bytezero!·zhenglei 5 * 6 * 系统简介: 7 * 学校有几个规格不同的机房,由于使用时经常出现“撞车”的现象,开发一套系统,解决这一问题 8 * 身份简介: 9 * 学生代表:申请使用 阅读全文
posted @ 2021-08-20 19:15 Bytezero! 阅读(762) 评论(0) 推荐(0)
  2021年8月19日
摘要: 1 /* 2 比赛规则: 3 学校举行一演讲比赛,共12个人参加,比赛两轮,第一轮为淘汰赛 第二轮为决赛 4 每名选手都有对应的编号:如10001~10012 5 比赛方式:分组比赛 每组6人 6 第一轮分为两小组,整体按照选手编号进行抽签后顺序演讲 7 十个评委分别个每名选手打分,去除最高分和最低 阅读全文
posted @ 2021-08-19 10:35 Bytezero! 阅读(232) 评论(0) 推荐(0)
  2021年8月18日
摘要: 1 //常用集合算法 2 //set_intersection //求俩个容器的交集 3 //set_union //求两个容器的并集 4 //set_difference //求两个容器的差集 5 6 #include<iostream> 7 #include<vector> 8 #include 阅读全文
posted @ 2021-08-18 20:36 Bytezero! 阅读(211) 评论(0) 推荐(0)
摘要: 1 //常用算术生成算法 //#include<numeric> accumulate 2 //fill //向容器中填充指定的元素 3 #include<iostream> 4 #include<vector> 5 #include<numeric> 6 #include<algorithm> 7 阅读全文
posted @ 2021-08-18 19:41 Bytezero! 阅读(77) 评论(0) 推荐(0)
摘要: //常用拷贝和替换算法 //copy //replace 将指定区间范围内的旧元素修改为新元素 //replace_if(满足条件的元素,替换指定的元素) //swap 互换两个容器的元素 #include<iostream> #include<vector> #include<algorithm> 阅读全文
posted @ 2021-08-18 19:21 Bytezero! 阅读(154) 评论(0) 推荐(0)
摘要: 1 //常用排序算法 sort //打乱 random_shuffle 2 //merge 两个容器元素合并,并储存到另一容器中(相同的有序序列) 3 //reverse 将容器内的元素进行反转 4 5 #include<iostream> 6 #include<string> 7 #include 阅读全文
posted @ 2021-08-18 15:43 Bytezero! 阅读(61) 评论(0) 推荐(0)
摘要: 1 //按条件统计元素个数 2 //count_if 3 4 #include <iostream> 5 #include<string> 6 #include<vector> 7 #include<algorithm> 8 9 using namespace std; 10 11 class Gr 阅读全文
posted @ 2021-08-18 14:48 Bytezero! 阅读(115) 评论(0) 推荐(0)
摘要: 1 //统计元素个数 2 3 #include<iostream> 4 #include<string> 5 #include<vector> 6 #include<algorithm> 7 using namespace std; 8 9 //统计内置数据类型 10 void test01() 1 阅读全文
posted @ 2021-08-18 14:27 Bytezero! 阅读(141) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 33 下一页