当前位置:网站首页>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

边栏推荐
猜你喜欢

小马智行起诉擎天智卡:索赔6000万 彭军称要斗争到底

力扣206-反转链表——链表

数据驱动的软件智能化开发| ChinaOSC

codeforces:C. Maximum Subrectangle【前缀和 + 贪心 + 最小子数组和】

百利药业IPO过会:扣非后年亏1.5亿 奥博资本是股东
[email protected] 594/[email prote"/>RNA核糖核酸修饰Alexa 568/[email protected] 594/[email prote

化算力为战力:宁夏中卫的数字化转型启示录

ARMuseum

开源教育论坛| ChinaOSC

RNA-ATTO 390|RNA-ATTO 425|RNA-ATTO 465|RNA-ATTO 488|RNA-ATTO 495|RNA-ATTO 520近红外荧光染料标记核糖核酸RNA
随机推荐
ARMuseum
小马智行起诉擎天智卡:索赔6000万 彭军称要斗争到底
tRNA修饰2-甲基胞嘧啶(m2C)|tRNA修饰m2G (N2-methylguanosine)
友宏医疗与Actxa签署Pre-M Diabetes TM 战略合作协议
单调栈及其应用
RNA-ATTO 390|RNA-ATTO 425|RNA-ATTO 465|RNA-ATTO 488|RNA-ATTO 495|RNA-ATTO 520近红外荧光染料标记核糖核酸RNA
汉源高科8光口12电口交换机千兆8光8电12电16电网管型工业以太网交换机
Internet Download Manager简介及下载安装包,IDM序列号注册问题解决方法
NNLM、RNNLM等语言模型 实现 下一单词预测(next-word prediction)
EasyCVR平台海康摄像头语音对讲功能配置的3个注意事项
一种能有效缓解环境噪声对音频质量干扰的方案
1161 最大层内元素和——Leetcode天天刷【BFS】(2022.7.31)
Golang死信队列的使用
演讲议题及嘉宾重磅揭晓,TDengine 开发者大会推动数据技术“破局”
leetcode 2119. 反转两次的数字
Use ControlTemplate or Style from resource file in WPF .cs and find the control
华为设备配置VRRP负载分担
ESP8266-Arduino编程实例-BH1750FVI环境光传感器驱动
多模态 参考资料汇总
JMeter笔记5 |Badboy使用和录制