使用宏定义写取余运算 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;// 定义求余数的宏// 注意:除数b不能为0,使用时需确保#define MO…… 题解列表 2025年04月09日 1 点赞 0 评论 61 浏览 评分:10.0
简单111111111111111——1037 摘要:解题思路:注意事项:参考代码:def zhi(a,b): n=a%b return na,b=map(int,input().strip…… 题解列表 2025年02月27日 0 点赞 0 评论 148 浏览 评分:0.0
简单的宏定义 摘要:解题思路:其实可以把宏定义看成一个可以自行设计的自定义函数,但必须注意的是,宏定义的表达式必须与调用的一样,并且数值名称也要一样,如interes如int a,int b;注意事项:参考代码:#inc…… 题解列表 2024年09月11日 1 点赞 0 评论 535 浏览 评分:0.0
输入两个整数,求他们相除的余数。用带参的宏来实现,编程序。 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#pragma warning(disable : 4996)#define AUM(a,b) c=a%b;int main(){ …… 题解列表 2024年09月01日 0 点赞 0 评论 392 浏览 评分:0.0
[编程入门]宏定义的练习 摘要:解题思路:定义一个宏定义,求取a b的余数注意事项:取余符号是%参考代码:#include<stdio.h>#define reasu (a%b)main(){ int a,b; s…… 题解列表 2024年08月27日 0 点赞 0 评论 213 浏览 评分:0.0
编写题解 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 评论 430 浏览 评分: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 评论 236 浏览 评分:9.9
1037 宏定义的练习(相当于函数,不过有些参数需要声明) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define qiuyu(a,b) t=a%b;int main(){ int m,n,t; scanf("%d%d",&m,&n);…… 题解列表 2024年05月16日 0 点赞 0 评论 112 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #define YU(x,y) x%y int main() { int x,y; scanf("%d %d…… 题解列表 2024年04月27日 0 点赞 0 评论 249 浏览 评分:0.0
1037: [编程入门]宏定义的练习(Python) 摘要:解题思路:自定义函数注意事项:区分算数运算符的运用:/ 除 60/10 6 % 取余 10%9 1 参考代码:def much_1(a,b): …… 题解列表 2024年03月11日 0 点赞 0 评论 196 浏览 评分:6.0