Answers for "c++ get abs value"

C++
1

abs in c++

#include <iostream>
#include <cstdlib>
using namespace std;

int main() {

  // get absolute value of -5
  cout << abs(-5);

  return 0;
}

// Output: 5
Posted by: Guest on September-30-2021

Browse Popular Code Answers by Language