当前位置:网站首页>Abs (), fabs () and LABS ()
Abs (), fabs () and LABS ()
2022-08-03 20:12:00 【Luna programming】
abs ()
Syntax:
#include
int abs( int num ); //parameter type is int typep>
Function: The function returns the absolute value of the parameter num.For example:
int magic_number = 10;cout << "Enter a guess: ";cin >> x;cout << "Your guess was " << abs( magic_number - x ) << " away from the magic number." << endl;labs ()
Syntax:
#include
long labs( long num );//The parameter type is long long
Function: The function returns the absolute value of the parameter num.
fabs ()
Syntax:
#include
double fabs( double arg );//The parameter type is double
Function: The function returns the absolute value of the parameter arg.
Mainly to find the absolute value of the higher precision double or float type
The above three functions can share a header file

边栏推荐
猜你喜欢

Statistical machine learning 】 【 linear regression model
[email protected] 610/[email protected] 594/Alexa 56"/>染料修饰核酸RNA|[email protected] 610/[email protected] 594/Alexa 56
[email protected] 594/[email prote"/>RNA核糖核酸修饰Alexa 568/[email protected] 594/[email prote

钱江摩托某型号产品ECU货不对版 消费者知情权应如何保障?

ThreadLocal详解

YARN功能介绍、交互流程及调度策略

演讲议题及嘉宾重磅揭晓,TDengine 开发者大会推动数据技术“破局”

ARMuseum

高并发,你真的理解透彻了吗?

【飞控开发高级教程6】疯壳·开源编队无人机-AI语音控制
随机推荐
Alexa染料标记RNA核糖核酸|RNA-Alexa 514|RNA-Alexa 488|RNA-Alexa 430
php根据两点经纬度计算距离
RNA核糖核酸修饰Alexa 568/[email protected] 594/[email prote
「学习笔记」高斯消元
leetcode 448. Find All Numbers Disappeared in an Array 找到所有数组中消失的数字(简单)
不要再用if-else
抖音web逆向教程
头条服务端一面经典10道面试题解析
倒计时2天,“文化数字化战略新型基础设施暨文化艺术链生态建设发布会”启幕在即
tRNA修饰2-甲基胞嘧啶(m2C)|tRNA修饰m2G (N2-methylguanosine)
leetcode 326. 3 的幂
小马智行起诉擎天智卡:索赔6000万 彭军称要斗争到底
利用 rpush 和 blpop 实现 Redis 消息队列
子结点的数量(2)
leetcode 剑指 Offer 15. 二进制中1的个数
花 30 美金请 AI 画家弄了个 logo,网友:画得非常好,下次别画了!
阿洛的反思
消除对特权账户的依赖使用Kaniko构建镜像
ESP8266-Arduino编程实例-MCP4725数模转换器驱动
CSDN帐号管理规范