_abs64(): This function is available in the file stdlib.h. This function calculates the absolute value of the argument. It takes one parameter whose absolute value is to be determined. There are no error returns in this function.
Parameters: One parameter is required for this function.
__X: The value whose absolute value is to be determined.
Syntax:
_abs64(__X)
For Example:
_abs64(-1001021289992) = > It returns the value 1001021289992.
Approach
C++
#include <bits/stdc++.h>using namespace std;int main(){long long x = -1001021289992;cout << _abs64(x) << "\n";return 0;}
No comments:
Post a Comment