函数原型:
这是非常简单的函数,返回绝对值(数字模块)。它的意思是,如果你使用了负数,则会得到一个正数结果。使用示例:
int a=-10; double b=-20.0; double c=7.0; a=MathAbs(a); // now a is equal to 10 b=MathAbs(b); // now b is equal to 20.0 c=MathAbs(c); // the value of c will not change, for it was positive复制代码
int a=-10; double b=-20.0; double c=7.0; a=MathAbs(a); // now a is equal to 10 b=MathAbs(b); // now b is equal to 20.0 c=MathAbs(c); // the value of c will not change, for it was positive
收藏 0 点赞 2 评论 使用道具
点赞 评论 使用道具
发表评论 评论后跳转到最后一页
您还未插入代码,请在菜单栏点击<>插入代码:
请输入对应售价:
H币
提交
填写个人签名