宏定义的练习 摘要:解题思路:注意事项:注意要求是a/b的余数 余数参考代码:#include<stdio.h> #define yushu (a%b) int main() { int a,b,c; …… 题解列表 2023年07月21日 0 点赞 0 评论 740 浏览 评分:9.9
带参数宏定义练习 解题思路:用宏定义来交换a,b的值,宏定义#defineSWAP(a,b){a=a+b;b=a-b;a=a-b;}以此来交换a,b的值,在程序中,用swap来调用注意事项:参考代码:#include#defineSWAP(a, 题解列表 2023年07月21日 0 点赞 0 评论 536 浏览 评分:0.0
C++实现]迭代法求平方根 摘要:# 二分法 ```c++ #include using namespace std; int main() { double x; cin>>x; …… 题解列表 2023年07月21日 0 点赞 0 评论 587 浏览 评分:0.0
数据结构-简单选择排序 C++实现 摘要:# 选择排序模板 1.确定分界点 `q[l]`,`q[(l+r)/2]`,`q[r]` 随机 2.调整 >=x 和= r) return; int x = num…… 题解列表 2023年07月20日 0 点赞 0 评论 743 浏览 评分:0.0
2831: 画矩形(C语言) 摘要: #include int main() { int a,b; char c; int d; scanf("%d %d %c %d",&a,&b,&c,&d); …… 题解列表 2023年07月20日 0 点赞 0 评论 663 浏览 评分:0.0
2883: 矩阵加法 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int n,m,a[100][100],b[100][100];int main(…… 题解列表 2023年07月20日 0 点赞 0 评论 535 浏览 评分:9.9
计算矩阵边缘元素之和 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int a[100][100];int main(){ int n,m,su…… 题解列表 2023年07月20日 0 点赞 0 评论 588 浏览 评分:0.0
C语言解组合的输出 摘要:解题思路:注意事项:注意输出格式参考代码:#include <stdio.h>#include <stdbool.h>int n,r;bool judge[25];int b[25];void arr…… 题解列表 2023年07月20日 0 点赞 0 评论 719 浏览 评分:2.0
自定义函数之字符类型统计 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int tongji(char s1[1000],int m);int main(){ char s…… 题解列表 2023年07月20日 0 点赞 0 评论 433 浏览 评分:0.0
C++题解 1796: 蛇形填数 摘要:参考代码:首先定义数组 输入格数#include <bits/stdc++.h> using namespace std; int a[1100][1100]; int main() { …… 题解列表 2023年07月20日 0 点赞 0 评论 1040 浏览 评分:5.2