当前位置:网站首页>C language: comprehensive application of if, def and ifndef
C language: comprehensive application of if, def and ifndef
2022-07-06 21:34:00 【Nianchi ichthyology programming】
#include <stdio.h>
#define MAX
#define MAXIMUM(x,y) (x>y)?x:y
#define MINIMUM(x,y) (x>y)?y:x
int main()
{
int a = 10 , b = 20;
#ifdef MAX
printf(" The bigger number is :%d\n",MAXIMUM(a,b));
#else
printf(" The smaller number is :%d\n",MINIMUM(a,b));
#endif
#ifdef MIN
printf(" The smaller number is :%d\n",MINIMUM(a,b));
#else
printf(" The bigger number is :%d\n",MAXIMUM(a,b));
#endif
#undef MAX
#ifdef MAX
printf(" The bigger number is :%d\n",MAXIMUM(a,b));
#else
printf(" The smaller number is :%d\n",MINIMUM(a,b));
#endif
#define MIN
#ifndef MIN
printf(" The smaller number is :%d\n",MINIMUM(a,b));
#else
printf(" The bigger number is :%d\n",MAXIMUM(a,b));
#endif
return 0;
}
Running results :
The bigger number is :20
The bigger number is :20
The smaller number is :10
The bigger number is :20
边栏推荐
- Hill | insert sort
- el-table表格——获取单击的是第几行和第几列 & 表格排序之el-table与sort-change、el-table-column与sort-method & 清除排序-clearSort
- [interpretation of the paper] machine learning technology for Cataract Classification / classification
- Five wars of Chinese Baijiu
- Aike AI frontier promotion (7.6)
- Data Lake (VIII): Iceberg data storage format
- js之遍历数组、字符串
- One line by line explanation of the source code of anchor free series network yolox (a total of ten articles, you can change the network at will after reading it, if you won't complain to me)
- [Li Kou brush questions] 32 Longest valid bracket
- Guava: use of multiset
猜你喜欢

对话阿里巴巴副总裁贾扬清:追求大模型,并不是一件坏事

MLP (multilayer perceptron neural network) is a multilayer fully connected neural network model.

JPEG2000 matlab source code implementation

红杉中国,刚刚募资90亿美元

Is this the feeling of being spoiled by bytes?

愛可可AI前沿推介(7.6)

50个常用的Numpy函数解释,参数和使用示例

KDD 2022 | realize unified conversational recommendation through knowledge enhanced prompt learning

039. (2.8) thoughts in the ward

JPEG2000-Matlab源码实现
随机推荐
20220211 failure - maximum amount of data supported by mongodb
Internet News: Geely officially acquired Meizu; Intensive insulin purchase was fully implemented in 31 provinces
[MySQL] trigger
Seven original sins of embedded development
【Redis设计与实现】第一部分 :Redis数据结构和对象 总结
El table table - sortable sorting & disordered sorting when decimal and% appear
[MySQL] basic use of cursor
Reflection operation exercise
2022 fields Award Announced! The first Korean Xu Long'er was on the list, and four post-80s women won the prize. Ukrainian female mathematicians became the only two women to win the prize in history
Guava: use of multiset
快讯:飞书玩家大会线上举行;微信支付推出“教培服务工具箱”
js 根据汉字首字母排序(省份排序) 或 根据英文首字母排序——za排序 & az排序
uni-app App端半屏连续扫码
Nodejs教程之让我们用 typescript 创建你的第一个 expressjs 应用程序
Thinking about agile development
numpy 下载安装
R语言做文本挖掘 Part4文本分类
14 years Bachelor degree, transferred to software testing, salary 13.5k
js通过数组内容来获取数组下标
This year, Jianzhi Tencent