Mega Code Archive

 
Categories / C++ Tutorial / Development
 

Use the abs() function

#include <iostream>  #include <cstdlib>   using namespace std;    int main()  {    int result;      result = abs(-10);      cout << result;      return 0;  } 10"