函数功能: 交换任意两个同类型的数 函数一: #include <stdio.h> /* * 运行环境:MinGW 和 MSVC 都可用 * */ /* * 这里添加 do-while 循环是为了兼容到不加花括号的if语句中,例子如下: * if(condition) SWAP(x, y, double); else{ other statements;} * */ #define SWAP(a, b, type) d