min_max.c

来自「不错书对C++/C程序员很有用的大家不要错过.」· C语言 代码 · 共 13 行

C
13
字号
#include <stdio.h>

#define MIN(x, y) (((x) < (y)) ? (x): (y))
#define MAX(x, y) (((x) > (y)) ? (x): (y))

void main(void)
 {
   printf("Maximum of 10.0 and 25.0 is %f\n", MAX(10.0, 25.0));
   printf("Minimum of 3.4 and 3.1 is %f\n", MIN(3.4, 3.1));
 }

  

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?