上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: int _tmain(int argc, _TCHAR* argv[]) { int i, j, a[2][4], SUM = 0, n; double ave, m = 0; for (i = 0; i < 2; i++) { cout << "请输入第:" << i + 1 << "个学生的各科 阅读全文
posted @ 2023-09-04 19:01 Maguyusi 阅读(15) 评论(0) 推荐(0)
摘要: 题目一:已知线性表LA和LB中的数据元素按值非递减有序排列,现要求将LA和LB归并为一个新的线性表LA且LA的元素依然按值非递减有序排列。LA=(3,5,8,11,24) LB=(2,6,8,9,11,20) 要求1:(1)线性表用数组表示。 (2)不借助多余的存储空间。 要求2:(1)线性表使用单 阅读全文
posted @ 2023-09-04 12:54 Maguyusi 阅读(40) 评论(0) 推荐(0)
摘要: Vim利用正则表达式替换匹配字符串 例如: script="Test",j=10,rnd=50, script="Test",j=20,rnd=20, script="Test",j=30,rnd=20, script="Test",j=40,rnd=10, 将j=*都替换为j=0且前后不影响 命令 阅读全文
posted @ 2023-08-16 11:30 Maguyusi 阅读(12) 评论(0) 推荐(0)
摘要: 4.1编写函数strindex(s,t)它返回字符串t在s中最右边出现的位置。如果s中不包含t,则返回-1。 官方答案多一个变量 j , 用来记录i , j = i;多判断了t[k] == '\0' 结果得到的一直是-1 #include "stdafx.h" int strindex(char s 阅读全文
posted @ 2023-07-31 10:09 Maguyusi 阅读(46) 评论(0) 推荐(0)
摘要: 1.构造函数不能有返回类型,也不能由virtual, const, static 和 volatile来修饰。但可以由inline来修饰,事实上隐式构造函数就是用inline来修饰的。inline表示编译时展开,通常速度块;virtual表示运行时绑定,通常意味着灵活。 2.类中存在虚函数或者有虚基 阅读全文
posted @ 2023-07-11 11:45 Maguyusi 阅读(76) 评论(0) 推荐(0)
摘要: 原文:http://www.cnblogs.com/TonyEwsn/archive/2010/01/29/1659496.html 在计算机领域,堆栈是一个不容忽视的概念,我们编写的C语言程序基本上都要用到。但对于很多的初学着来说,堆栈是一个很模糊的概念。堆栈:一种数据结构、一个在程序运行时用于存 阅读全文
posted @ 2023-07-07 22:34 Maguyusi 阅读(49) 评论(0) 推荐(0)
摘要: Lua两个table中B中所有元素大于等于A中每个元素的个数 A={5,10,15,20,25,30,35,40,45,50} B={5,10,15,20} local ret=0 for i=1,#A do res=true; for j=1,#B do if (B[j]<A[i]) then r 阅读全文
posted @ 2023-05-29 23:08 Maguyusi 阅读(7) 评论(0) 推荐(0)
摘要: int _tmain(int argc, _TCHAR* argv[]) { int a[3]; int i; int sum = 0; float avg, k; int Cnt = 0, Cnt1 = 0; for (i = 0; i < 3; i++) { printf("请输入第%d个学生的 阅读全文
posted @ 2023-04-24 16:03 Maguyusi 阅读(19) 评论(0) 推荐(0)
摘要: #include "stdafx.h" #include <iostream> using namespace std; bool isNumber(char *str) { char *p = str; if (*p == '0' && *(p+1) != '\0') //防止输入第一个为0后面跟 阅读全文
posted @ 2023-04-23 21:15 Maguyusi 阅读(42) 评论(0) 推荐(0)
摘要: #include "stdafx.h" #define Miss 1 //宏定义为1 (0表示false 1表示true) int _tmain(int argc, _TCHAR* argv[]) { char str[20]="C Language",c; int i = 0; while ((c 阅读全文
posted @ 2023-03-20 17:34 Maguyusi 阅读(14) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 下一页