How to define macros Max and min separately to achieve the maximum and minimum values of two numbers, and then call the macro to find the maximum and minimum values of five arbitrary numbers entered from the keyboard.

CSDN Q & A 2021-12-30 08:54:09 阅读数:483

define macros max min achieve

How to define macros separately max and min Find out the maximum and minimum values of two numbers , Then the macro is called to find the maximum and minimum values of five arbitrary numbers entered from the keyboard.




Refer to the answer 1:
#define max(a,b) ((a)>(b)?(a):(b))#define min(a,b) ((a)<(b)?(a):(b))



Refer to the answer 2:
版权声明:本文为[CSDN Q & A]所创,转载请带上原文链接,感谢。 https://primo.wiki/2021/12/202112300854059766.html