上一页 1 2 3 4 5 6 ··· 9 下一页
该文被密码保护。 阅读全文
posted @ 2025-02-22 09:42 郭立恒 阅读(1) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; int n; struct asd{ int id,sum; string s; }a[110]; bool cmp(asd a,asd b){ if(a.sum!=b.sum){ return a.sum>b 阅读全文
posted @ 2025-02-06 09:06 郭立恒 阅读(41) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2024-12-29 09:22 郭立恒 阅读(12) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int main(int argc, char** argv) { system("title 梦幻西游启动"); printf("恭喜你 噩梦开始了\n"); system("pause"); printf("1.人 阅读全文
posted @ 2024-12-27 19:24 郭立恒 阅读(20) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; system("pause") 可以实现冻结屏幕 system("CLS") 可以实现清屏操作 调用color函数可以改变控制台的前景色和背景,具体参数在下面说明。 例如,用 system("color 0A"); 其 阅读全文
posted @ 2024-12-27 18:36 郭立恒 阅读(19) 评论(0) 推荐(0)
摘要: #include <iostream> #include <cstdio> using namespace std; struct no{ string name; int age; string blc; int shengao; int tizhong; }; int main(int argc 阅读全文
posted @ 2024-12-20 19:14 郭立恒 阅读(7) 评论(0) 推荐(0)
摘要: 1.创建结构体 成员变量 多个 成员函数 多个 其他结构体 多个 2.定义结构体变量 结构体名 变量名 3.调用 .成员访问符 for循环: for(1.初始条件;2.循环条件3.条件改变){ 4.表达式 } while: 1 while(2){ 4 3 } sort 使用 #include <bi 阅读全文
posted @ 2024-12-08 08:32 郭立恒 阅读(41) 评论(0) 推荐(0)
摘要: /* 1 500 魔力奶茶 8 10 2 500 茉莉奶茶 8 10 3 500 磨砺奶茶 8 10 4 500 莫离奶茶 8 10 5 500 美丽奶茶 8 10 */ /* string 转 char 数组 c_str() printf 函数 %s 字符串 如果报错,加上 c_str()函数转换 阅读全文
posted @ 2024-12-01 10:00 郭立恒 阅读(13) 评论(0) 推荐(0)
摘要: (2)选择排序: 基本思想:从数组的未排序区域选出一个最小的元素,把它与数组中的第一个元素交换位置;然后再从剩下的未排序区域中选出一个最小的元素,把它与数组中的第二个元素交换位置。重复上述过程,直到数组中的所有元素按升序排列完成。 【案例】 对一维数组中的十个数据进行从小到大排序: #include 阅读全文
posted @ 2024-11-10 09:47 郭立恒 阅读(29) 评论(0) 推荐(0)
摘要: 运用 vector 和冒泡排序 进行大小排序 #include <iostream> #include <vector> using namespace std; int main(){ vector <int> a; a.push_back(3); a.push_back(2); a.push_b 阅读全文
posted @ 2024-10-27 09:39 郭立恒 阅读(21) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 9 下一页