C++检查数字是否为2的幂的实现算法 C++检查数字是否为2的幂的实现算法完整源码(定义,实现,main函数测试) C++检查数字是否为2的幂的实现算法完整源码(定义,实现,main函数测试) #include <iostream> /// for std::cout /** * @namespace math * @brief Mathematical algorithms */ namespace math { /** * @brief Function to test above algorithm * @param n description * @returns void */ void power_of_two