宏定义的练习 摘要:解题思路:注意事项:注意要求是a/b的余数 余数参考代码:#include<stdio.h> #define yushu (a%b) int main() { int a,b,c; …… 题解列表 2023年07月21日 0 点赞 0 评论 730 浏览 评分:9.9
超简单代码 摘要:解题思路:宏定义 a%b得到答案即可注意事项:参考代码:#include<iostream>using namespace std;#define s(a,b) a%b;//宏定义规则int main…… 题解列表 2023年09月14日 0 点赞 0 评论 824 浏览 评分:9.9
题解 1037: [编程入门]宏定义的练习 摘要:##思路 `a%b`即可。 ##代码 ```cpp #include using namespace std; int main(){ int a,b; cin>>a>>b; …… 题解列表 2024年02月07日 0 点赞 1 评论 549 浏览 评分:9.9
编写题解 1037: [编程入门]宏定义的练习 摘要:```c #include #define compute(a,b) result=a%b; int main() { int a,b,result; scanf("%d %d",&a…… 题解列表 2024年06月04日 0 点赞 0 评论 825 浏览 评分:9.9
用函数写的 摘要:解题思路:注意事项:参考代码:def get_sum(a=4,b=3): a,b =map(int,input().split()) sum = a%b print(sum)get_…… 题解列表 2024年06月02日 0 点赞 0 评论 690 浏览 评分:10.0
使用宏定义写取余运算 解题思路:注意事项:参考代码:#includeusingnamespacestd;//定义求余数的宏//注意:除数b不能为0,使用时需确保#defineMOD(a,b)((a)%(b))intmain(){intnum1, 题解列表 2025年04月09日 2 点赞 0 评论 682 浏览 评分:10.0