奖学金,运用sort函数对结构体类型排序 摘要:解题思路:结构体类型排序,运用sort函数注意事项:自定义比较方法:bool cmp(struct Student &a, struct Student &b)小于5人,则全部输出参考代码:#incl…… 题解列表 2022年01月19日 0 点赞 0 评论 657 浏览 评分:9.9
指针应用,注意虽然是冒泡,但是指针交换值与数组还是有差别 摘要:#include#include#includetypedef struct stu{ int sno; int grade; }STU,*stu; int main(){ int n…… 题解列表 2022年01月19日 0 点赞 0 评论 318 浏览 评分:0.0
不向自定义数组的大小 摘要:#include<stdio.h> #include<string.h> #include<malloc.h> int main(){ int n,m; int status=s…… 题解列表 2022年01月19日 0 点赞 0 评论 232 浏览 评分:0.0
通过单链表删除,省的数组太大,导致循环多次.莫名其妙的char* 摘要:#include<stdio.h> #include<string.h> #include<malloc.h> typedef struct Node{ int c; s…… 题解列表 2022年01月19日 0 点赞 0 评论 244 浏览 评分:0.0
不如链表好,太多判断, 摘要:#include<stdio.h> #include<string.h> #include<malloc.h> int main(){ int n; int status=sca…… 题解列表 2022年01月19日 0 点赞 0 评论 305 浏览 评分:9.9
1097: 蛇行矩阵(最简洁明了) 摘要:解题思路:看题目找规律注意事项:不用再找其他的了,我的是最简单的参考代码:n=int(input())List=[[0]*n for _ in range(n)]List[0][0]=1k=1for …… 题解列表 2022年01月18日 0 点赞 9 评论 866 浏览 评分:9.9
优质题解 阶乘求和(思路不难,但个别地方新手容易翻车)C语言代码 摘要:####解题思路: `S0 = 0 ; A1 = 1! = 1;` `S1 = S0 + A1 = 1!; A2 = 2! = 2*1! = 2*A1 = 2*1;` `S2 = S1 …… 题解列表 2022年01月18日 1 点赞 38 评论 10312 浏览 评分:9.2
用辗转相除法来求最大公约数与最小公倍数【C语言】 摘要:# 用辗转相除法来求最大公约数与最小公倍数 代码如下: ```c #include int gcd(int m, int n) { int q; while (q = m % n) …… 题解列表 2022年01月18日 0 点赞 0 评论 473 浏览 评分:0.0
编写题解 1042: [编程入门]电报加密 摘要:```c #include #include #include int main() { char a[100] = {'\0'}; int i,m; gets(a); m …… 题解列表 2022年01月18日 0 点赞 0 评论 413 浏览 评分:0.0
使用”三目运算符“求三数中的最大值 摘要:# 使用”三目运算符“求三数中的最大值 三目运算符:表达式1?表达式2:表达式3 若表达式1成立,执行表达式2;否则,执行表达式3. 参考代码如下: ```c #include int m…… 题解列表 2022年01月18日 0 点赞 1 评论 709 浏览 评分:9.9