码迷,mamicode.com
首页 > 其他好文 > 详细

使用宏定义来判断是a和b 的大小

时间:2019-09-05 21:43:39      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:code   判断   fine   ret   int   max   print   使用   include   

#include <stdio.h>
#include <math.h>
#define MAX(a, b) (a) > (b) ? printf("a > b") : printf("a < b")

int main(void)
{
    int a, b;
    scanf("%d %d",&a,&b);
    MAX(a,b);    
    
    return 0;
 }

使用宏定义来判断是a和b 的大小

标签:code   判断   fine   ret   int   max   print   使用   include   

原文地址:https://www.cnblogs.com/fanhua666/p/11469951.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!