摘要: 记录点刚学到的, 不成体系 判断浮点数为0 #include <cmath> float a=1.0, b=2.0, c=1.0; float delta = power(b, 2) - 4*a*c //使用数学运算, 计算差 //比较float为0时, 不能直接delta==0, 要判断其绝对值小 阅读全文
posted @ 2021-07-22 15:35 编程驴子 阅读(32) 评论(0) 推荐(0) 编辑